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?
|
Accepted answer
Ralph Schoon (63.3k●3●36●46)
| answered Jun 13 '12, 4:11 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
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
Comments
Vladimir Amelin
commented Jun 14 '13, 6:31 a.m.
Hi Ralph, Are there any enhancements in 4.0.x regarding relationships validation? No, but you can find most of the code here: http://rsjazz.wordpress.com/2012/07/31/rtc-update-parent-duration-estimation-and-effort-participant/
Vladimir Amelin
commented Jun 14 '13, 6:46 a.m.
Thank you! |
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.