I have a boolean variable set up in Rules, and I set up a "Data Comparison" action in the Rules UI, selecting this variable.

When I got to the step where I was supposed to enter the value to compare, it gave me a checkbox saying "Data Value":
Rules UI screen shot

I found that very confusing... A help/description message saying "Check for TRUE, and uncheck for FALSE" or something like that would have helped, or better yet instead of a checkbox, make it a select or radios with values TRUE and FALSE. The single on-off checkbox with label "Data value" just didn't make sense. Keep in mind that in a "data comparison" action I have to choose a variable/value to compare with another variable/value, so checking a box doesn't seem like "entering a value" to me.

#15 2014065-boolean-value.png8.3 KBheddn
#15 2014065-boolean-force-redirect.png11.35 KBheddn
#13 d7_rules.patch792 bytesfago
PASSED: [[SimpleTest]]: [MySQL] 351 pass(es).
[ View ]
#11 rules-ui-very-confusing-2014065-11.patch1.24 KBheddn
PASSED: [[SimpleTest]]: [MySQL] 351 pass(es).
[ View ]
#5 rules-UI-BooleanValues-2014065.png7.54 KBheddn
#4 rules-UI-BooleanValues-2014065-4.patch1.03 KBheddn
PASSED: [[SimpleTest]]: [MySQL] 351 pass(es).
[ View ]
datavalueboolean.png21.2 KBjhodgdon


The UI is similarly confusing for Set a Data Value for Booleans, where it also has a checkbox with label "Value".

I agree that this is very confusing. It was only after finding this issue that I was able to figure out how to use this type of data comparison.

Converting to radios sounds reasonable. Anyone cares to roll a patch?

Status:Active» Needs review
new1.03 KB
PASSED: [[SimpleTest]]: [MySQL] 351 pass(es).
[ View ]

Here you go.

new7.54 KB

Here's a screenshot.

That looks like probably the right fix... guess it probably needs manual testing though.

Does this patch fix Booleans wherever they appear, or does there need to be a separate fix depending on if it's being used in a Data Comparison or a Set a Data Value?

In response to: #6, it fixes both conditional and set data value.
Tagging appropriately.

+1 for this - I agree the UI is very confusing. Just tested the patch in #4 and it works well for me! Maybe with another user test, we can switch to 'reviewed and tested'??

Status:Needs review» Reviewed & tested by the community

Looks like we have two manual tests and I reviewed the code too, so let's at least provisionally set to RTBC.

Status:Reviewed & tested by the community» Needs work

I see that this is confusing in that situation, but the same UI will be used to generate other checkboxes as well, e.g. check the page redirect action with the patch applied. I doubt it makes a good UX there?

So, we
a) need to find a solution that works for both cases or
b) we leave the current way as default and implement an alternate way that's used to input booleans for the generic actions/conditions only. I doubt this would be very simple though, as we'd have to some checking to add the UI customizations only for booleans params... :-/

Maybe, you've got some good ideas for a) though?

Status:Needs work» Needs review
new1.24 KB
PASSED: [[SimpleTest]]: [MySQL] 351 pass(es).
[ View ]

After looking at the page redirect action I see what you mean. I've revised the wording a little better now. This wording makes sense to me. Anyone else?

hm. I tried to improve it a bit - see attached, but I think it's still a too big pita for the page-redirect case.

What about going with radios and labels "Enabled" / "Disabled" ?

new792 bytes
PASSED: [[SimpleTest]]: [MySQL] 351 pass(es).
[ View ]

Issue tags:-Novice

that's not so simple, actually ;-)

Issue tags:+Novice
new11.35 KB
new8.3 KB


Cross-post on the screenshots. They are related to #11

This really needs to be pushed to Rules... I was fiddling with the data comparison for quite some time and it really doesn't make sense the way it is being displayed by default.

I like the approach in #11. That makes the most sense to me!