In IRC, Richard_Georg wanted to add the following conditions to a CA predicate: (x && ((k && l) || (m && n)). However it appears this cannot be done, as you cannot add a group inside an existing group using the current UI - though looking at the code it seems to support nested groups in this manner. This was also possible using the workflow_ng UI in Drupal 5.

Comments

rszrama’s picture

Status: Active » Closed (works as designed)

This is actually by design, even though the condition evaluation code can technically handle it. The reason is that at some point in time this feature was costing too much time to figure out in the context of the single form approach CA takes to the conditions and actions forms for not enough perceived benefit. Obviously that means the only recourse would be for Richard_Georg to either contrive a different way to achieve his business goals or craft a quickie custom condition. I'm of the mind that a custom condition (or even a PHP condition if writing it in a module is simply out of the question) should be fairly simple.

Ideally, this would be different. For now, this is simply by design and won't be addressed for the 2.0 release. I wouldn't rule it out for future inclusion, of course. : D

damien tournoud’s picture

Note that (x && ((k && l) || (m && n)) is the same as (x && k && l) || (x && m && n). There is no technical need for nesting condition groups.

rszrama’s picture

Good eye, Damien. : D

BayerMeister’s picture

To longwave: Thanks for filing this issue.

To the rest: I am well aware that every condition can be changed to a disjunction of conjuctions (and conjunction of disjunctions). It was good will that drove me to tell someone about it ;-) I found the transformed condition to be less easy to understand and maintain (in more complicated cases). No problem for me. Thnaks!