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
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.
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.
Comments
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/
Thank you!