RTC: Work Item conditions and validation don't seem to work in Closed States
Scenario:
Boolean: Attribute A
Text: Attribute A1
Boolean: Attribute B
Text: Attribute B1
Boolean: Attribute C
Text: Attribute C1
Enumeration List: Attribute D
NOTE:
Can be only one value, but is represented as checkboxes.
I would like to make this a radio box selection - but Customer insisted on NOT having a default value.
Wrote validator to check that only one is selected.
Logic seems to work for validator but am allowed to save workitem when more than one item is checked.
This attribute is only required in 2 states (Closed, Closed-Pending)
Text: Attribute D1
Text: Attribute D2
Text: Attribute D3
Text: Attribute D4
I have created validators and conditions to do the following:
If A = true, then A1 is required. (works)
If B = true, then B1 is required. (works)
If C = true, then C1 is required. (works)
If D = value1, then D1 is required (makes D1 required, but let's me save without entering any text)
If D = value2, then D2 is required (makes D2 required, but let's me save without entering any text)
If D = value3, then D3 is required (makes D3 required, but let's me save without entering any text)
If D = value4, then D4 is required (makes D4 required, but let's me save without entering any text)
Is there a specific order the conditions and validators need to appear in the Operational Behavior area in order to make this work?
|
2 answers
Ralph Schoon (63.6k●3●36●46)
| answered Sep 14 '16, 9:46 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
Validations only prevent saving if the status the create is
Severity["ERROR"]
and the precondition Attribute Validation is configured (and run).
https://jazz.net/wiki/bin/view/Main/AttributeCustomization#Validators Comments
Heather Linsk
commented Sep 14 '16, 1:52 p.m.
I am getting a Validation Error in my code. Could it be because I have a second Validator that gets executed after it that is OK? Most likely no.
Heather Linsk
commented Sep 26 '16, 10:01 a.m.
Does order matter when using the pre-condition: Required Attributes For Condition?
Ralph Schoon
commented Sep 26 '16, 10:36 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
There is an order (top to bottom in the configuration) you can use one operation and multiple, it should not matter as far as I can tell.
|
Not sure how you write the script but you need to make sure that the condition script returns true on the server side, assuming that you are using the Required Attributes For Condition precondition for the operation Save Work Item (server). The attribute shown as required in a browser only means that the script runs correctly on the client side.
Also, check out the below post for how to use a radio group without a default value. https://jazz.net/forum/questions/228381/how-do-i-set-up-a-enumeration-displayed-as-a-radio-group-without-a-default-value-in-the-web-client Comments
Heather Linsk
commented Sep 27 '16, 12:54 p.m.
The condition script does return true.
Donald Nong
commented Sep 27 '16, 7:55 p.m.
I can't think of anything else based on what you said. It just sounds like a mystery. You'd better contact Support and send in the process template for a close examination.
Heather Linsk
commented Sep 28 '16, 9:00 a.m.
Ok. Thank you Donald.
|
Your answer
Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.