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

How do I know in a validator script that a field has changed.

I have created scripts to validate dates. The dates cannot be before the current date at the time of the update but if I make a change for another field of the work item few days after, I don't want to check the dates fields.
How can I code my script to do that, how do I know that a field has been changed ?

0 votes



One answer

Permanent link

Please read https://jazz.net/wiki/bin/view/Main/AttributeCustomization carefully. Also check the links in that explanation. Also consider to look into https://jazz.net/library/article/1093 there is a lot of information in the last two chapters.

Validators are called by the framework if one of the dependent attributes is changed. You don't know which. You basically read all the attributes you need for the validator (usually only the attribute this validates) and then return the verdict.

Note: Read the section about data formats https://jazz.net/wiki/bin/view/Main/AttributeCustomization .
Also google for how to compare dates in JavaScript. There are many posts around this here in the forum, most tagged with attribute-customization.

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: May 30 '18, 5:27 a.m.

Question was seen: 1,852 times

Last updated: May 30 '18, 5:50 a.m.

Confirmation Cancel Confirm