Needs work
Project:
Rules
Version:
7.x-2.x-dev
Component:
Rules Core
Priority:
Major
Category:
Feature request
Assigned:
Issue tags:
Reporter:
Created:
17 Mar 2010 at 19:31 UTC
Updated:
11 Jun 2017 at 20:02 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
mitchell commentedBumping feature request to 7.x.
Judging by fago's comment in #852596: Port path module integration, this'll probably be easier with pluggable path cleaners.
Comment #2
fagoIndeed. Maybe we could add a textual data processor doing that? We could also offer some other simple text processing options like strip html tags.
Comment #3
fagoSuggestions for other useful and easy to implement text processing capabilities are welcome. So far I think
* make lower/uper case
* ucfirst char
* strip html tags
would be useful.
Comment #4
fagobump. We still need that.
Comment #5
mitchell commentedA very similar set of functionality is currently available to Feeds through its preprocessing hook in an extension, called Feeds Tamper. Here is a link to all the text processors which will be easy to port and will work very well in a generalized fashion: http://drupalcode.org/project/feeds_tamper.git/tree/refs/heads/7.x-1.x:/...
Comment #6
mitchell commentedComment #7
mitchell commentedMarked #1323056: Calculations and Rounding as a duplicate.
Rounding is basically trim, I think.
Comment #8
mitchell commentedSome long overdue code can be found in Rules Data Transforms. I originally intended to have this code posted here as a patch, but that'll be next on my list. In any event, @maintainers, please review the code and let me know if there's anything specific that needs to be changed in order to have it merged and if a separate project is necessary in your minds.
Comment #9
mitchell commentedRe: #7. I was wrong. Rounding is a separate function. Added #1371492: Rounding to rules_data_transforms.
Comment #10
mitchell commentedTransformation seems a bit more refined over processing.
Comment #11
AndrzejG commented@Mitchell - please update dev of Your module, to include this Rounding function.
Comment #12
mitchell commentedUploading a tar.gz of requested code. If someone else can help by reviewing the code and submitting a patch, I would really appreciate it. Coding isn't my expertise, and I've already done quite a bit to produce this.
Known bug: #1429076: Action: 'make uppercase' doesn't work.
See also, Issues tagged 'data transforms' for more related code improvements and use cases.
Comment #13
freddura commentedFor the action "combine list into string" it would beneficial to be able to select a multi-value field as a list option from within the data selector. For example, if a have a multi-value integer field titled "field-integer-list" which resides in the node being viewed, then I should be able to select that integer list directly from within the data selector by typing in and receiving a match: "node:field-integer-list." Instead I receive a match: "node:field-integer-list:" When I change the match to "node:field-integer-list" and click save, I receive an error message: "The data type of the configured argument does not match the parameter's input_list requirement."
Look forward to this patch being committed to the rules module nevertheless. Thanks!
Comment #14
mitchell commentedHere's a patch with the functions listed in the issue summary:
Current Bugs
The code does work.
drush dl rules_data_transformswill get you up and running. The patch is mainly here to illustrate where the code might go and how it might look.@fago, what do you think of the coding style and organization? I don't like adding a second file, like I did here, but organizing it as you did in data.eval.inc and data.rules.inc is a bit difficult. I started #1540394: Make Data API's module integrations pluggable to address this in a way that will deal with the other data related patches.
Side note: I had really hoped that by renaming rules_data_transforms.rules.inc to data_transforms.rules.inc and putting it Rule's modules dir, it would work. The file and function names seemed to align, but I cleaned my cache and was not so lucky, so I'm interested to find out why it didn't work.
Comment #14.0
mitchell commentedupdate
Comment #15
mitchell commentedI removed 'implode & explode lists', 'combine lists', and 'permute lists' from this issue, because they fit better in another.
Also, 'convert string to date' is also addressed in #1301022: Action: type conversion for numbers, integers, and strings. It's better suited there.
Comment #16
mitchell commentedIn order to get this to a review-able state, this patch needs to be rewritten to extend data.rules.inc and data.eval.inc. I will see if can handle the port in the next few days, but if I don't post anything with a week, consider me unassigned.
I really want to see this go in soon, but if you do to, then trust me... you're coding skills are better than mine.
Comment #17
tr33m4n commentedI posted this on the rules data transform module page, thought I'd post it here as well. Attached a patch that allows first word only capitalization or capitalization of every word in the string.
Cheers
Comment #18
dmoonman commentedComment #19
klonosThanx for bumping this Derek ;)
Comment #19.0
klonosa
Comment #20
mjcarter commentedThe rules_data_transforms module has existing features and number of patches waiting to be committed adding features which aren't specifically related to text handling - things like unserializing data and converting from one array type to another.
At the moment the module is marked as a temporary code location for things related to this issue.
My thoughts are that rules_data_transforms may contribute more to the community by remaining a separate module which handles all advanced data manipulation not carried out by rules itself, sort of equivalent to the feeds_tamper module's relation to feeds - particularly in light of the lack of progress on this issue.
What are others thoughts on this?
Comment #21
sonicthoughts commentedStumbled on this - exactly what I'm looking for but totally hidden! Biggest reason to add to Rules as a submodule is so people know it exists!
Comment #22
jelo commentedCould the maintainers clarify what the approach going forward is going to be, e.g. integration into rules, sub-module of rules or separate module? I find these additional actions very useful. Unfortunately, Rules Data Transform at https://www.drupal.org/project/rules_data_transforms is only in dev and still states it is temporary while this discussion started more than 4 years ago. The functionality seems to be working though...
Thanks!
Comment #23
thepanz commentedI would also add my module: https://www.drupal.org/sandbox/thepanz/rules_list_extra to the list.
It focuses on lists, the first action supported is "merge list", and I am planning to add further functions.
Support and help needed, or could it be better to integrate it with rules_data_transform module?
Comment #24
dercheffeIMHO a very important feature. +1