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

How to: find state of the wi referenced by URI reference

Hello,
I'm trying to find a state of the defect referenced from task by 'Affected By' link. The reference is URI reference and I failed to find a way how I could find the state using URI or stateid of the defect.

Any ideas?

0 votes


Accepted answer

Permanent link
Please look at http://rsjazz.wordpress.com/2012/10/20/following-calm-links-using-the-java-client-or-server-api/ for the server and the client API.
Timur Markunin selected this answer as the correct answer

1 vote

Comments

Thanks a lot, Ralph! It works now.


2 other answers

Permanent link
 We discussed this and the link Timur is referring to is a CALM link. He will get an URi for it. So he will have to use some OSLC or REST interface to access the link target.

0 votes

Comments

Hi Ralph,
I just wonder if there is some standard way in RTC SDK? I'm confused because this defect is in the same RTC project area and it's just RTC work item of different type.
I could find its UUID and stateid using

ILink link= wir.get(j).getLink();
UUID stateID = link.getStateId();
UUID itemID = link.getWorkingCopy().getItemId();

Is it any way to find the defect state having stateid and itemid?

-Thanks in advance


Permanent link
Timur,

the stateID is a historical or current state of the work item and not the work item workflow state.

I looked deeper in the SDK and found something that works for me in a test environment. See http://rsjazz.wordpress.com/2012/09/19/the-rtc-workitem-link-api-linking-workitems-to-other-elements/ the last operation. It is marked with *Update*.

0 votes

Comments

Sorry, Ralph. I failed to find Update. Are you talking about public static void changeUserID(ITeamRepository teamRepository,
    String originalID, String newID, Boolean doUpdate) method?

-thanks in advance

Sorry, wrong URL, not sure how that happened. Use http://rsjazz.wordpress.com/2012/09/19/the-rtc-workitem-link-api-linking-workitems-to-other-elements/ search for Update.

Thanks Ralph!
Should it work for server side extension?

-thanks in advance

That is client code. But when the client can do it, the server should too. Have you tried to use for references where the location is used as parameter in calls? Try to find the Service that is analog to the Client Library.

It looks it doesn't work for me cause iReference.getLink().getOrigin() returns null 

Timur,

getOrigin() is used to get the teamRepository to get the client libraries in the client.

In a server extension you use getService() from AbstractService (that you extend) to get a service instead.

showing 5 of 6 show 1 more comments

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,978

Question asked: Oct 17 '12, 3:41 p.m.

Question was seen: 5,052 times

Last updated: Oct 21 '12, 10:54 a.m.

Confirmation Cancel Confirm