Bug 1048962

Summary: GRE: input for field used with dependent enumeration not updated
Product: [Retired] JBoss BRMS Platform 6 Reporter: Zuzana Krejčová <zkrejcov>
Component: Business CentralAssignee: manstis
Status: CLOSED CURRENTRELEASE QA Contact: Pavel Kralik <pkralik>
Severity: medium Docs Contact:
Priority: medium    
Version: 6.0.0CC: etirelli, lpetrovi, manstis, mbaluch, vigoyal
Target Milestone: ER2   
Target Release: 6.0.1   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Known Issue
Doc Text:
Cause: Consequence: Value fields using dependent enumerations for constraints in a Guided Rule are not updated when user switches the value it depends on. Workaround (if any): After switching the value depended upon, remove the last input element of the problematic constraint and re-add it. Result: For an enumeration like 'A.a' : ['a','b','c'] 'A.b[a=b]' : ['b1','b2'] and rule containing 'There is an A with: (field) a equal to (value) b (field) b equal to (value) b1' if user switches value of field a to a or c (and vice-versa), the input box for value for field b is disabled instead of correctly updated. This input box then must be removed and re-added to make it work again.
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-08-06 19:58:44 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
screenshot - disabled drop down instead of input field none

Description Zuzana Krejčová 2014-01-06 16:02:41 UTC
Created attachment 846155 [details]
screenshot - disabled drop down instead of input field

Description of problem:

Enumeration is as follows:
  'A.a' : ['a','b','c']
  'A.b[a=b]' : ['b1','b2']
In the Guided rule editor, I first add the 'There is an A with:' condition, then add the 'a' field constraint with 'b' as the value, after that I add the 'b' field constraint and choose from the enum drop down.
If I change the 'a' constraint value, the drop down for 'b' constraint gets disabled instead of turning into an input field. It stays that way even if I change the first constraint value back to 'b'.
To get the correct input element (after changing first constraint value), you have to remove the disabled drop down and re-add it (Literal value).

When you start with value 'a' or 'c' for the a field constraint, you won't get the drop down box for field b constraint if you change to value 'b' either. The simple input field stays there.


Version-Release number of selected component (if applicable):
BPMS 6.0 ER7


Steps to Reproduce:
1. Create a POJO A with String fields a and b and the above mentioned enumeration.
2. Create a new guided rule, add a new condition - choose fact A.
3. Click the added line, choose restriction on field a, choose 'equal to' operator an Literal value.
4. Choose 'b' as the value.
5. Click the first line again, add restriction on field b, choose the same operator and Literal value again.
6. Choose a value for field b.
7. Change value for field a to 'c'.


Actual results:
Drop down box for field b is disabled, no value visible. Source shows the previously selected dependent value though.


Expected results:
Drop down box for field b changed into simple input field, user can type in the preferred value.




(I think there was a BZ for the same issue for 5.3 but couldn't find it. If anyone stumbles across that, please add a link.)

Comment 3 manstis 2014-02-19 13:32:04 UTC
Guided Rule, Guided Decision Table and Guided Rule Template Editors fixed.

Comment 4 Pavel Kralik 2014-03-20 14:17:54 UTC
Restrictions on fields with dependent enumeration works as described in Expected results.

Verified for brms-6.0.1-ER2 deployable for eap6.