Issue with programmatic link creation in RTC 4.0
I am using this example http://rsjazz.wordpress.com/2012/09/19/the-rtc-workitem-link-api-linking-workitems-to-other-elements/ to create links between two work items. How manyever times I run this sample applicaiotn that many times the same link is created. Normally this is not possible in GUI but via the script it is creating same link many times. Here is my code snippet
public class LinkingWI { /** public WorkItemReferencesModification(IWorkItemHandle opposite) { @Override } Kindly note the login is done in different class.
Any tips on how to avoid this? |
Accepted answer
Ralph Schoon (63.5k●3●36●46)
| answered Mar 01 '13, 10:36 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
Hi, I would implement a check and test if the link is already there. That is what the UI does, I think.
Karthik Krishnan selected this answer as the correct answer
Comments
Karthik Krishnan
commented Mar 01 '13, 10:37 a.m.
Hi Ralph,
Can you give me some heads up on how I can check for an existing link
Many thanks for the useful blogpost
1
Ralph Schoon
commented Mar 01 '13, 10:47 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
You get the references for the endpoint you are interested in. Then you have to iterate it and check if the work item that you want to link to is already there.
|
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.