How to get Affected By Defect in Java API
Hello Team,
I am trying to get the list of Affected By Defect logs using Java API, Though there is no direct parameter for Affected By Defect in WorkItemEndPoints
I am using the following code, but isItemReference() is not returning true
How can i fetch the logs details, Thanks for help!! |
Accepted answer
Ralph Schoon (63.5k●3●36●46)
| answered Jan 27 '16, 11:13 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
Because it is not a WorkItem to Work Item Link and it is likely not an ItemReference either.
The link type should be com.ibm.team.workitem.common.model.WorkItemLinkTypes.AFFECTED_BY_DEFECT and the endpoint should be ILinkTypeRegistry.INSTANCE.getLinkType( WorkItemLinkTypes.AFFECTED_BY_DEFECT) .getTargetEndPointDescriptor()); You will get an URI and will have to use REST/OSLC to access the details. Ralph Schoon selected this answer as the correct answer
Comments
Pankaj Sharma
commented Jan 28 '16, 7:49 a.m.
Hello Ralph, Thanks for the suggestion. Is there any sample code to use REST/OSLC? Thanks.
Ralph Schoon
commented Jan 28 '16, 8:07 a.m.
| edited Jan 28 '16, 8:07 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
I am not an OSLC guy, there have ben numerous answers on this forum, so it might be beneficial to search. Also the RTC server uses REST/OSLC, so it might be an idea to search how it does that in the source. Tedios, I know, but that would be my first approach. Maybe als interesting: https://jazz.net/forum/questions/214885/use-current-user-session-to-login-another-project-through-rtc-plugin/215303 maybe these internal interfaces provide a hint?
|
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.
Comments
Hello Pankaj