It's all about the answers!

Ask a question

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


Timur Markunin (6495165145) | asked Oct 17 '12, 3:41 p.m.
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?

Accepted answer


permanent link
Ralph Schoon (63.1k33646) | answered Oct 20 '12, 3:47 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
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

Comments
Timur Markunin commented Oct 21 '12, 10:54 a.m.

Thanks a lot, Ralph! It works now.

2 other answers



permanent link
Ralph Schoon (63.1k33646) | answered Oct 18 '12, 7:22 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
edited Oct 18 '12, 8:30 a.m.
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*.

Comments
Timur Markunin commented Oct 18 '12, 7:59 a.m.

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


Ralph Schoon commented Oct 18 '12, 8:30 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER

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.


Timur Markunin commented Oct 18 '12, 11:36 a.m.

Thanks Ralph!
Should it work for server side extension?

-thanks in advance


Ralph Schoon commented Oct 18 '12, 12:43 p.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER

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.


Timur Markunin commented Oct 19 '12, 11:00 a.m.

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


Ralph Schoon commented Oct 19 '12, 11:51 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER

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

permanent link
Ralph Schoon (63.1k33646) | answered Oct 17 '12, 5:34 p.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
 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.

Comments
Timur Markunin commented Oct 18 '12, 4:57 a.m.

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


Your answer


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