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

access to "linked" work items via a script-based validator?

I'm trying to create a script-based validator that needs to get access/use the values of attributes in linked work items.  For example, we have two custom work item types that use the dependsOn relationship (but we also have the same with parent/child relationships).   We want to not allow the child to be put into an "in progress" state when the parent is still in "Open", and also the same with the dependsOn relationship (the work item that Blocks the other cannot be in an "In Progress" state if the DependsOn one is still in Open).

We have been using some script-based attributes, so my thought was to add an attribute (although not in the editor) that has a validator that then would run when the work item is saved.  That validator would check the status of the two work items and determine if there are "data integrity" issues and if so, put up an error. If not, then the validator of this hidden field would return true.

However, I haven't found any examples of script-based validators (or calculated fields for that matter) that deal with a 2nd work item.

Is this possible??
Susan


0 votes



One answer

Permanent link
Susan, the JavaScript API does not allow you to follow links. You would have to create a Java Based Validator or an advisor. See some more information about limitations of the JavaScript API here: https://rsjazz.wordpress.com/2013/06/26/attribute-customization-java-based-value-providers-conditions-and-validators/

1 vote

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
× 6,130

Question asked: Jul 01 '13, 11:09 p.m.

Question was seen: 4,581 times

Last updated: Jul 02 '13, 2:28 a.m.

Confirmation Cancel Confirm