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

Does a script based validator overwrite the precondition operation behaviour for attributes?

I have created a script to validate two date fields against each other where date 1 must be earlier then date 2. If they are OK you can proceed and save the WI.

But if they are not valid, you can still save the workitem - even though I have set the operation behaviour for Save WI and set these fields as Required attributes.

Is there a reason why the operation behaviour allows saving even if the fields are invalid and thrown an error message?

Here are the steps I completed to add the script to the attributes:

1.    Created the attributes for the date fields.
2.    Set the Save Work Item precondition for the fields in Operation Behaviour (Required attributes precondition.)
3.    Created a  script based validator.
4.    Associated the JavaScript file to the attributes.
5.    Made fields dependent on each other.

0 votes



One answer

Permanent link
Hi Sinead,
In step 2, you also need to add "Attribute Validation" precondition, with which all attribute values will be validated when they are saved on the server
Please have a look the wiki https://jazz.net/wiki/bin/view/Main/AttributeCustomization#Validators 

0 votes

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

Question asked: Dec 09 '14, 8:53 a.m.

Question was seen: 4,100 times

Last updated: Dec 10 '14, 2:20 a.m.

Confirmation Cancel Confirm