It's all about the answers!

Ask a question

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


Sudaraazhi Arivalagan (441728) | asked Jun 25 '15, 9:37 a.m.
edited Jun 25 '15, 9:46 a.m. by Ralph Schoon (63.1k33646)

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 

Accepted answer


permanent link
Ralph Schoon (63.1k33646) | answered Jun 25 '15, 9:49 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
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

Comments
Sudaraazhi Arivalagan commented Jun 25 '15, 9:50 a.m.

Thanks Ralph !


Ralph Schoon commented Jun 25 '15, 9:54 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER

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/


Sudaraazhi Arivalagan commented Jun 26 '15, 1:30 a.m.

Oh Thanks.

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.