It's all about the answers!

Ask a question

How can I get all the delivered change sets in event handler?

Michele Pegoraro (1.8k14119103) | asked Nov 25 '15, 6:42 a.m.
I have the following needed: i need to change the state of a work item after all the linked change-sets have been delivered. In order to achieve this I initially develop 2 extension:
- a followup of the delivery operation that gets all the change-set links and verifies that are all already delivered an then perform a change of state
- a precondition on the save work item that blocks the change of state if not all the change-sets have been delivered

The two extension work well one by one but when runned togheter (like in the last deliver) I have a big problem: in the save work item precondition (triggered by the followup change of state) I cannot see the change sets in delivery as part of the history of the target stream (probably because the entire operation is still running).

So I change my first extension in an event handler, of category . The problem is that the event handler is called only one time for every deliver, regardless how many change sets are involved (correctly), but the event.getItem() returns only ONE change set (the older one) and not all the change sets involved (they are mentioned only in the event description but I don't like to rely in regular expression on a pre-compiled string).

What can I do to get all the change sets involved?


Luca Martinucci commented Feb 11 '16, 8:41 a.m.

Michele, any updates on this issue?
I have the same need.

Michele Pegoraro commented Feb 11 '16, 8:43 a.m.

Unfortunately no. I had to change approach..

Be the first one to answer this question!

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.