It's all about the answers!

Ask a question

How do we know whether an workitem has links programmatically


Girish Chandra P (853246) | asked Jun 18 '15, 5:10 a.m.
edited Jun 18 '15, 5:13 a.m. by Ralph Schoon (63.3k33646)
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



permanent link
Ralph Schoon (63.3k33646) | 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


Register or 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.