Attached patch provides action for accessing variable_get under System group.

Files: 
CommentFileSizeAuthor
system.rules_.inc_.patch1.97 KBJamesap
PASSED: [[SimpleTest]]: [MySQL] 329 pass(es).
[ View ]

Comments

David Stosik’s picture

Status:Needs review» Reviewed & tested by the community

It works, and it's very useful, thanks!

fago’s picture

Status:Reviewed & tested by the community» Needs work

That's reasonable functionality, but it's not something that works well for the main module. Non-developers don't know about available variables or which types they are, so it won't work or make a lot of sense for them. I'd suggest putting it into in extra module or integrating it with the variables modules to provide better UX.

So this won't go into Rules itself, but let's keep the issue here to have a point for further collaboration on that.

David Stosik’s picture

rich.3po’s picture

Very useful patch, thanks, i've been looking for something like this for a while

Personally i think it should be rolled into the core module (how often do non-devs use Rules anyway..?)

Cheers

Larzan’s picture

Great, thats exactly what i was looking for :)

I agree with the latter comment: why not include it?
I for example use it to get the email texts that are config setting of my module, and those the end user knows as he has to set them himself (giving the variable name in the description)

I use it to specifically to PREVENT the user to have to enter the complicated rule settings to change the email text that is being sent in certain circumstances.

IMHO it is very useful and helps making the maintnance for the "end-admin" easier.

WillowDigit’s picture

Issue summary:View changes

Very nice patch! And I too agree that it should be included. I think manipulating system variables is an intermediary level site builder concept and so it advanced Rules, so the two go together well.

radj’s picture

Followed this issue and +1. I think it would make Rules even more powerful if it can read and set system variables. But starting with get would be OK, too.

adrift73’s picture

I too agree this would be a nice addition to the core functionality

Neograph734’s picture

I am still waiting on a reply from Jamesap, as he is the original author. But I've taken his patch and put it in a sandbox here: https://www.drupal.org/sandbox/neograph734/2483567

This prevents us from having to patch Rules every time there is an update.