Bug 745443 - Test Scenarios: Enumerations not working correctly
Summary: Test Scenarios: Enumerations not working correctly
Keywords:
Status: VERIFIED
Alias: None
Product: JBoss Enterprise BRMS Platform 5
Classification: JBoss
Component: BRM (Guvnor)
Version: BRMS 5.2.0-ER1
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: ER2
: BRMS 5.3.1 GA
Assignee: manstis
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-10-12 11:34 UTC by Zuzana Krejčová
Modified: 2023-05-15 19:52 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Previously, the QA section of the JBoss Enterprise BRMS user interface did not support dependent enumerations, which resulted in users having to use a work around. Support for dependent enumerations has now been added for the QA section of the user interface and the workaround is no longer necessary.
Clone Of:
Environment:
Last Closed:
Type: Bug
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Bugzilla 724802 0 high VERIFIED The 'advanced enums' doesn't work on test scenario 2024-06-03 13:06:06 UTC
Red Hat Bugzilla 742921 0 unspecified VERIFIED Dependent enumerations not working in Business Rules 2023-05-15 19:53:10 UTC

Description Zuzana Krejčová 2011-10-12 11:34:56 UTC
Description of problem:

Model used:
declare fact
 f1: String
 f2: String
end

Enumeration used:
'fact.f1' : ['a','b']
'fact.f2[f1=a]' : ['a1', 'a2']
'fact.f2[f1=b]' : ['b1', 'b2']

After playing a bit with Test Scenarios, I found out that:

If you insert a given fact (see above for the model and enumeration),
- any enum value you want has to be first selected, otherwise, Guvnor thinks it's null (this shows in the Audit log after clicking Show events). This means, for the "default" value in the dropdown, you have to select something else and then select the default again. You have to confirm your choice by saving the test scenario or running it.
- the depending enum value works the same as above. The dropdown list with the correct values is shown after "correctly" selecting and confirming the first value (the one it depends on).

Using Facts with Enumerations the above mentioned way makes it work, the right rules are fired.


Version-Release number of selected component (if applicable):
BRMS 5.2.0 ER5/CR1

Comment 1 manstis 2012-04-02 14:32:16 UTC
Fixed.

Comment 2 Ryan Zhang 2012-04-23 07:40:12 UTC
Update status to ON_QA. Please verify them against ER6.

Comment 3 Zuzana Krejčová 2012-04-25 16:22:06 UTC
Great work Michael, thanks. 
But I still need a minor fix for this issue - basically it all works, except for the case when you decide to use a different value for the first field, the one depended upon, if you already have the second field value selected. In such a case, the second field retains it's old values, until you run the scenario or save it.

Let's say I add the field f1 and choose value b. Then I add the field f2 - there's b1 selected. Then I change my mind and for the f1 field, I select value a. For the field f2, there's still b1 selected and b1 and b2 as options. 

It already works with business rules, so I hope it won't be too hard to fix.

Comment 4 Geoffrey De Smet 2012-04-26 15:34:33 UTC
The fix consists out of 2 parts. This is part 1 on master:
https://github.com/droolsjbpm/guvnor/commit/36c9395e4572ce98a73a4efdf6f116e78990d863

Comment 5 manstis 2012-04-27 15:39:05 UTC
Note: This is not flagged as a blocker. Do you want it for 5.3.x release?

Comment 6 Zuzana Krejčová 2012-04-30 08:59:59 UTC
I think we don't need it for 5.3.x - it can be worked around and the original issue was already "reduced". Better to dedicate the time to blockers now.

Thanks guys.

Comment 7 manstis 2012-04-30 09:31:05 UTC
OK. I will *NOT* work on this BZ for 5.3.x unless told otherwise. I will devel_ack "-" in accordance with comment #6.

Comment 8 manstis 2012-04-30 15:13:44 UTC
This has been completed on the master and *5.4.x* branch.0dfe4f289d571a2bf6ce532f2a81af50e4bf29ff

Comment 9 manstis 2012-04-30 15:14:46 UTC
Excuse the (accidentally pasted) commit SHA on the end of comment #8 :)

Comment 10 manstis 2012-05-02 12:28:41 UTC
This has been fixed in community release 5.4.

Comment 12 lcarlon 2012-06-08 03:34:11 UTC
    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:
When using enumerations with facts, the correct enumeration is not always selected. If the enumeration is the default value and it is not selected, by first selecting another value and then selecting the default value, Null is used in its place. The workaround is to select another value.

Comment 13 Zuzana Krejčová 2012-09-12 12:07:14 UTC
I'm sorry to say, I still see the bug from comment 3 - perhaps the fix has not been picked up?

Julian, Michael, could you, please, look at it again?
Just for info, I'm using standalone distro for testing.

Comment 14 manstis 2012-09-12 12:39:14 UTC
Hi, according to comment #8 the fix for #3 was only made to master and 5.4.x :( I will look into back-porting the fix (https://github.com/droolsjbpm/guvnor/commit/1be140a05f19325b02b5a607c22d7e19a39d8ea3).. bit busy today though.

Comment 16 Zuzana Krejčová 2012-10-05 10:59:56 UTC
Works like a charm, thank you.

Comment 17 lcarlon 2012-10-10 03:00:04 UTC
Hi Michael,

If you'd like this issue to be included in the release notes, please let me know how the issues was resolved.

Thanks
Lee

Comment 18 manstis 2012-10-10 07:57:26 UTC
(In reply to comment #17)
> Hi Michael,
> 
> If you'd like this issue to be included in the release notes, please let me
> know how the issues was resolved.
> 
> Thanks
> Lee

Hi Lee,

The QA screen did not have support for dependent enums. The fix was to add support for dependent enums.

Cheers,

Mike

Comment 19 lcarlon 2012-10-11 03:20:34 UTC
Thanks Mike.


Note You need to log in before you can comment on or make changes to this bug.