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

On delivery of ChangeSet, can i get the parent workitem of the associated workitem?

Hi Ralph,

I have a requirement to restrict Users on delivery of changesets when the Parent of Associated workitem is "SI" or "Enhancement" workitem.

I use DeliverOperationData for the operations. But, when i try to get the Parent References using ISaveParameter, i get the below exceptions,

java.lang.ClassCastException com.ibm.team.scm.service.internal.process.LegacyDeliverOperationData incompatible with com.ibm.team.workitem.common.ISaveParameterjava.lang.ClassCastException:

I understood the Exception, but how do i retrieve the Parent workitem of Associated changeset Workitem?

Thanks

Sudar 

0 votes


Accepted answer

Permanent link
You need to write an advisor/precondition for deliver. Similar to this example - that you probably should use to get started: https://rsjazz.wordpress.com/2012/11/01/restrict-delivery-of-changesets-to-workitem-types-advisordelivery-of-changesets-associated-to-wrong-work-item-types-advisor/

With the work item already fetched from the change set, you would have to find the parent of that. See https://rsjazz.wordpress.com/2012/07/31/rtc-update-parent-duration-estimation-and-effort-participant/ for how that works, and then look at that type as well.
Sudaraazhi Arivalagan selected this answer as the correct answer

0 votes

Comments

Thanks Ralph !

Did I mention, if you didn't do that already, you should really, really, really do the Extensions workshop mentioned in the hints where to get started? Start here and do the workshop as hinted: https://rsjazz.wordpress.com/2013/02/28/setting-up-rational-team-concert-for-api-development/

Oh Thanks.

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
× 159

Question asked: Jun 25 '15, 9:37 a.m.

Question was seen: 3,387 times

Last updated: Jun 26 '15, 1:30 a.m.

Confirmation Cancel Confirm