Created attachment 517378 [details] CreditApproval.png Description of problem: When a DSL sentence is added in the guided editor for BRL rules, each parameter of the sentence has it's input element used to enter the value. Value for an enumerated parameter is entered using a drop-down select box. The editor needs to refresh after certain common actions (adding/removing condition/action). When such a refresh occurs, each select box in DSL sentence changes it's current value as a side effect. The user might not notice that and save a rule in a different state than it was intended. Steps to Reproduce: 1. import sample mortgages repository 2. open CreditApproval rule 3. set the credit rating to 'Sub prime' 4. remove the only action 'Approve the loan' to make the editor refresh 5. notice the credit rating value has "decremented" to OK 6. each following operation decrements the value Actual results: the selected value gets "decremented" with each refresh Expected results: the selected value should not change when user is editing other parts of the rule Additional info: see attached screenshot(s)
Confirmed still exists in 5.3.0;.Beta1 (project)
Do we need to document this a known issue in the release notes? Thanks - Lee
It is worse. The dropdown value can be changed, but if you do save and close you notice that it is not saved. I'll ask Michael to take a look, the format that the DSL sentences has saved. Looks like it is not handling enums correctly.
Fix verified in ER3.
Technical note added. If any revisions are required, please edit the "Technical Notes" field accordingly. All revisions will be proofread by the Engineering Content Services team. New Contents: https://bugzilla.redhat.com/show_bug.cgi?id=729273 When adding DSL sentence in the guided editor enumerations are selected from a dropdown box, however, when the editor refreshes after certain actions the selected enumerations changed to different values. This has been resolved and the enumerations no longer change when the editor refreshes.
Technical note updated. If any revisions are required, please edit the "Technical Notes" field accordingly. All revisions will be proofread by the Engineering Content Services team. Diffed Contents: @@ -1,3 +1 @@ -https://bugzilla.redhat.com/show_bug.cgi?id=729273 - When adding DSL sentence in the guided editor enumerations are selected from a dropdown box, however, when the editor refreshes after certain actions the selected enumerations changed to different values. This has been resolved and the enumerations no longer change when the editor refreshes.
The bug recurred in ER4, I'm changing the state back to ASSIGNED. As described in comment 3, the selected value cannot be saved. Upon saving, selected values in all DSL drop-downs are reset to the first value in the list.
Asking for blocker. Might be a serious issue for existing repositories migrated to BRMS 5.2.0. If the repo contains DSL configurations affected by this issue, it would be necessary to convert them to not use ENUM constraints and yet more difficult would be to fix guided editor rules using the affected DSL senteces.
Technical note updated. If any revisions are required, please edit the "Technical Notes" field accordingly. All revisions will be proofread by the Engineering Content Services team. Diffed Contents: @@ -1 +1 @@ -When adding DSL sentence in the guided editor enumerations are selected from a dropdown box, however, when the editor refreshes after certain actions the selected enumerations changed to different values. This has been resolved and the enumerations no longer change when the editor refreshes.+When adding DSL sentence in the guided editor enumerations are selected from a dropdown box, however, when the editor refreshes after certain actions the selected enumerations changed to different values.
Regression was introduced with fix for BZ724529. Problem was that the selected value wasn't being set in the drop-down widget (the given example to recreate the problem was also showing "OK" as the credit rating whereas it should have been "OK"). Anyway, one line fix committed to 5.2.x branch.
Technical note updated. If any revisions are required, please edit the "Technical Notes" field accordingly. All revisions will be proofread by the Engineering Content Services team. Diffed Contents: @@ -1 +1 @@ -When adding DSL sentence in the guided editor enumerations are selected from a dropdown box, however, when the editor refreshes after certain actions the selected enumerations changed to different values.+When adding a DSL sentence in the guided editor enumerations are selected from a dropdown box, however, when the editor refreshed after certain actions the selected enumerations changed to different values.