Red Hat Bugzilla – Bug 1001752
Using no-loop attribute in guided editor can have surprising result
Last modified: 2014-08-06 16:15:18 EDT
Description of problem:
When no-loop attribute is added its value checkbox is unchecked (meaning false), however the DRL source contains only "no-loop" without any value, which has the same meaning as "no-loop true". After saving the rule (without touching the no-loop checkbox and leaving it in its default unchecked state) and reopening it, the checkbox is checked. That is consistent with the .rdrl file content, however slightly surprising.
Version-Release number of selected component (if applicable):
Steps to Reproduce:
1. create a new Guided rule
2. add no-loop attribute
3. save the rule, close it and reopen
no-loop checkbox is unchecked after step 2 and checked after step 3.
no-loop checkbox should be checked after adding the attribute.
no-loop defaults to "false" (when the attribute is completely omitted). When the user is adding it to the rule it's probably in order to set it to "true", therefore it makes sense to default to "true" after adding the attribute. The only error is that it's checkbox state doesn't reflect this.
If the user as explicitly added the no-loop attribute I've made it so the DRL renders "no-loop false" or "no-loop true". Not rendering the attribute at all could confuse the user (and means when we unmarshall from DRL the "no-loop" attribute would be missing all together if it wasn't in the DRL).