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

Validator for work item type in parent-child attribute

I'm a newbie in RTC customization, and I need to define a validator for a links-type attribute.
This attribute must contain (as children) only work items of a certain type.
So, the validator should check for the type attribute of children and return an error if one of the children is not of the "right" type.
Can anybody provide me a sample .js code that does this validation?

0 votes


Accepted answer

Permanent link
Hi Luca, as far as I know this can not be done with a scripted extension. Java Script only allows you to access and manipulate certain types of attributes. Relationships are not included.

I would suggest reading https://jazz.net/library/article/784. It points to many resources. The Extensions Workshop https://jazz.net/library/content/articles/rtc/3.0.1/extensions-workshop/ is a good way to start writing these extensions. It shows development of a followup action. you want a precondition, but the basics are the same.

 
Luca Martinucci selected this answer as the correct answer

2 votes

Comments

Hi Ralph,

Are there any enhancements in 4.0.x regarding relationships validation?

Thank you!

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
× 12,025

Question asked: Jun 13 '12, 4:04 a.m.

Question was seen: 5,952 times

Last updated: Jun 14 '13, 6:46 a.m.

Confirmation Cancel Confirm