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

How to get a Work Items Link in a custom preconditon?

I'm developing a custom precondition that checks if the work item has certain links (live resolves) before resolving it.

I've set the development enviroment and did the workshop but I can't find a way to get the links for a work item and check the precondition.

Anyone knows how to do it?

0 votes


Accepted answer

Permanent link
here is the source of an advisor I wrote to check for a depends on link, and prevent the workitem resolving if the workitem depended on is not resolved.

https://jazz.net/forum/questions/64268/operation-advisor-custom-precondition-for-work-items

second post
Jorge Valdeiglesias selected this answer as the correct answer

0 votes

Comments

Thanks for the help!


I've end up using this: 

List references = saveParameter.getNewReferences().getReferences(WorkItemEndPoints.RESOLVES_WORK_ITEM);

Worked like a charm. Now I will try to make the link type configurable.


One other answer

Permanent link
 Hi Jorge,
have a look at 

https://jazz.net/forum/questions/161758/how-to-retrieve-the-changesets-associated-to-a-workitem-via-java-api

where Olivier explained how to receive Changesets associated with a Work Item.

If you run through the Workshop your development environment should be set up correctly. In your Eclipse do a "Java Search" and search for "WorkItemLinkTypes" (Types,References,..,Workspace).

With both information you should be able to solve your problem.

Have fun programming RTC extensions!

1 vote

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

Question asked: Sep 02 '14, 12:09 p.m.

Question was seen: 4,082 times

Last updated: Sep 03 '14, 8:19 a.m.

Confirmation Cancel Confirm