How to fetch changeset information on workitem save?
I am writing an advisor to get the change set information from link section of Task.
What is the workitem end point to get changeSet link or How to get reference to changeSet? for example I used below code to get related work items List<IReference> links = param.getNewReferences().getReferences(WorkItemEndPoints.RELATED_WORK_ITEM); Note:- I am writing a precondition using server side APIs. |
One answer
Ralph Schoon (63.3k●3●36●46)
| answered Apr 10 '15, 6:49 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER edited Apr 10 '15, 6:50 a.m.
The link type is WorkItemLinkTypes.CHANGE_SET , I think.
https://rsjazz.wordpress.com/2012/11/01/restrict-delivery-of-changesets-to-workitem-types-advisordelivery-of-changesets-associated-to-wrong-work-item-types-advisor/ explains the other direction. Maybe that helps. Comments
Vikash Singh
commented Apr 24 '15, 7:49 a.m.
Thank you for your reply. I am writing advisor which trigers on workitem save and the extension point used is"com.ibm.team.process.service.operationAdvisors"(com.ibm.team.workitem.operation.workItemSave). How can I access changeset attached to workitem using code on Workitem save.
sam detweiler
commented Apr 24 '15, 8:36 a.m.
the linktype Ralph mentioned will get you to the changeset object.
Vikash Singh
commented Apr 28 '15, 6:15 a.m.
Hi Sam, Ralph mentioned advisor would trigger on delivery of a change set however my requirement is at the time of save workitem. for Example- Object data = operation.getOperationData(); ISaveParameter param = (ISaveParameter) data;
Thank you. The blog shows other operational behavior that triggers on a work item save. Search for Advisor or Participant in the search field in the right upper section.
sam detweiler
commented Apr 28 '15, 7:59 a.m.
right.. the changeset link is in the workitem links.. so you should be able to get that is the advisor without problem.
Hi Vikash,
showing 5 of 6
show 1 more comments
|
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.