How to add related Artifacts by using server side plugin code
![]() Dear All, We're trying to link two different workitems through related artifacts by using server side code (trying to copying the attributes from one workitem to the other work item when linking with the related artifacts) If it is a parent and Child relationship, it is working fine and copying the Attribute Values but related artifacts linking it is not working. either we need to change anything in the additional parameters. Set<String> additionalParams = new HashSet<String>(); additionalParams.add(IExtensionsDefinitions.UPDATE_PARENT_STATE_EXTENSTION_ID); fWorkItemServer.saveWorkItem3(parentWorkItem, null, null, additionalParams); Thanks in Advanced. Govindaraj.
|
One answer
![]()
Ralph Schoon (63.3k●3●36●46)
| answered May 30 '16, 2:49 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER edited May 30 '16, 2:50 a.m.
1st: "it is not working" is not helpful, I'd recommend reading How should I ask a question in the Forum if I want to receive useful answers?
2nd: If you create a relationship in the server API, you MUST save the relationship in the 2nd parameter of IWorkItemServer.saveWorkItem3() See: https://rsjazz.wordpress.com/2012/09/20/the-rtc-workitem-server-link-api-linking-to-work-items-and-other-elements/ 3rd: Additional parameters are only used to pass information from one extension to another e.g. to prevent recursion. There is one additional parameter that is important for specific back links: IAdditionalSaveParameters.UPDATE_BACKLINKS See https://rsjazz.wordpress.com/2013/11/06/creating-clm-links-with-back-link/ For completeness see: https://rsjazz.wordpress.com/2012/10/20/following-calm-links-using-the-java-client-or-server-api/ Also note there are different types of creating links e.g. from an IWorkItem or from a location. If you create the reference in the wrong way, the links won't work. |
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.