Jazz Forum Welcome to the Jazz Community Forum Connect and collaborate with IBM Engineering experts and users

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?

1

0 votes



2 answers

Permanent link
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

0 votes

Comments

 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.

Does order matter when using the pre-condition:  Required Attributes For Condition?
Do I need to create a separate pre-condition for each condition or can I put them all in a single instance of Required Attributes For Condition?

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.


Permanent link
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

0 votes

Comments

The condition script does return true.
I am using the Required Attributes For Condition precondition for the operation Save Work Item (server).

Any other ideas?

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.

Ok.  Thank you Donald.

Your answer

Register or log in to post 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.

Search context
Follow this question

By Email: 

Once you sign in you will be able to subscribe for any updates here.

By RSS:

Answers
Answers and Comments
Question details
× 10,938

Question asked: Sep 14 '16, 8:32 a.m.

Question was seen: 3,919 times

Last updated: Sep 28 '16, 9:00 a.m.

Confirmation Cancel Confirm