Jazz Forum Welcome to the Jazz Community Forum Connect and collaborate with IBM Engineering experts and users

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.

 

0 votes



One answer

Permanent link
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.


 
 

0 votes

Your answer

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

Search context
Follow this question

By Email: 

Once you sign in you will be able to subscribe for any updates here.

By RSS:

Answers
Answers and Comments
Question details
× 10,941

Question asked: May 30 '16, 1:32 a.m.

Question was seen: 1,938 times

Last updated: May 30 '16, 2:50 a.m.

Confirmation Cancel Confirm