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

Can't see predecessor link in Query view when triggered through API in EWM.

 Hello, 


Trying to link one work item to another through "predecessor" link type. and fetching it in query view as well

was using API:
linkManager.createLink(linkType, sourceRef, destRef);

linkManager is of type ILinkManager

Link is not getting created when the linkType is "com.ibm.team.workitem.linktype.schedulePredecessor" or "predecessor".

Also, when tried with "succesor" link type, the link to the Work Item was successfully created (both successor in one and predecessor in another) and when I was trying to get the link in the query view by adding the column "predecessor" it did not find in query view. 

Thankyou 
Navjot

0 votes



One answer

Permanent link

 
What do you think could someone take from your statement above? It is not even a question. The shared code is not existent. 

 
The work item command line, I believe, supports the creation of such links. See https://github.com/jazz-community/work-item-command-line  

You can look into com.ibm.js.team.workitem.commandline.helper.WorkItemUpdateHelper
* updateLinks(ParameterValue, List<Exception>)
* createReferences(String, ParameterValue, List<Exception>)

com.ibm.js.team.workitem.commandline.parameter.ParameterLinkIDMapper, com.ibm.js.team.workitem.commandline.utils.ReferenceUtil

I think I don't use the Linkmanager in the work item command line, but a different API on top of it. 

There are different types of references for different link types. The URL that needs to be used in the link creation is different. There are HTTP based URI's, there are itemLocations and namedLocations based URIs. This becomes obvious if you read existing links and print the URIs.

For the locations see 
https://rsjazz.wordpress.com/2012/09/19/the-rtc-workitem-link-api-linking-workitems-to-other-elements/

The link types above require work item based link types using the namedLocation, if I am not mistaken. Follow the examples and description in the blog. The work item links only work on one server, not across different servers.

If you use the wrong URI, the links will not work and you will have issues trying to delete them. In EWM work item links also require a back link to be created using an additional safe parameter. Again, I tried to explain that in my blog posts and the work item command line does it as well.

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,927
× 7,487
× 1,316

Question asked: Apr 20 '23, 8:11 a.m.

Question was seen: 909 times

Last updated: Apr 20 '23, 9:13 a.m.

Confirmation Cancel Confirm