How do we know whether an workitem has links programmatically
Girish Chandra P (95●32●46)
| asked Jun 18 '15, 5:10 a.m.
edited Jun 18 '15, 5:13 a.m. by Ralph Schoon (63.5k●3●36●46)
I need to count the number of links for a given work item.
Scenario: I can save a work item or promote work item for next state only when we have child items to the Parent. Kindly let me know how can I achieve the same. |
One answer
Ralph Schoon (63.5k●3●36●46)
| answered Jun 18 '15, 5:15 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
Please see https://rsjazz.wordpress.com/2012/09/19/the-rtc-workitem-link-api-linking-workitems-to-other-elements/ especially Accessing References.
Comments
Ralph Schoon
commented Jun 18 '15, 5:18 a.m.
| edited Jun 18 '15, 5:20 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
You need to write a work item save advisor. The closest example I have published is https://rsjazz.wordpress.com/2014/05/26/only-owner-can-close-workitem-advisor/
Also see the extensions workshop referenced in the post to detect a state change.
You also want to look at the server link API: https://rsjazz.wordpress.com/2012/09/20/the-rtc-workitem-server-link-api-linking-to-work-items-and-other-elements/
Basically you want to check if there are children similar to https://rsjazz.wordpress.com/2012/07/31/rtc-update-parent-duration-estimation-and-effort-participant/ and then decide to stop the save.
|
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.