Closed (works as designed)
Project:
Ubercart
Version:
6.x-2.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
25 Sep 2009 at 08:57 UTC
Updated:
9 Oct 2009 at 06:51 UTC
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
Comment #1
rszrama commentedThis 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
Comment #2
damien tournoud commentedNote 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.Comment #3
rszrama commentedGood eye, Damien. : D
Comment #4
BayerMeister commentedTo 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!