It's all about the answers!

Ask a question

How do I retrieve a build instance's changes?


mark byrd (14712330) | asked Apr 17 '13, 2:14 p.m.
After a build, I can open the build instance and use the "show changes" link to see the change sets it brought in.  I'm running a java program in the ant build script. That program uses the Java API to find the work items for the current build instance, and the change sets for the those work items.  

My problem is that the work items have change sets that were brought in by earlier builds.

I want only the  change sets brought in by the current build.

How can I get the info shown under "show changes" using the API? What elements of the API cover that info?

Chris McGee's answer to the "How to retrieve changeset from baseline (build) with Java API"  makes me think this might be possible, but it requires locating snapshots which might be difficult in my situation.


Comments
mark byrd commented Apr 22 '13, 11:38 a.m.

I can compare build shapshots to get change sets pulled into a particular build. I have not determined yet how to get a change set's work item. I can, however, traverse the build's work items and ignore any work item change sets that were not found in the snapshots compare. This seems like a very convoluted approach, but does seem to reproduce what I see in the RTC GUI's build result "show changes" link. Any comments?


Tim Mok commented Apr 23 '13, 4:09 p.m.
JAZZ DEVELOPER
I can compare build shapshots to get change sets pulled into a particular build.


If you've compared the build snapshot to the previous build's snapshot then you have found the delta of change sets. I don't think you need the work items at this point based on your requirements in the initial question.


mark byrd commented Apr 24 '13, 9:04 a.m.

I would have to say that's probably true. I can now, using the RTC Java API, reproduce what I see in the Contribution Summary part of the RTC GUI's Build Result view. I will probably keep looking for a way to go from change set to work item, just for my own education. Thanks.

2 answers



permanent link
mark byrd (14712330) | answered Apr 24 '13, 11:38 a.m.
The info here ... https://jazz.net/forum/questions/24734/writing-a-new-build-engine ... showed me how  to go from change set to work item. 

permanent link
mark byrd (14712330) | answered Apr 24 '13, 11:41 a.m.
 The info here ... https://jazz.net/forum/questions/24734/writing-a-new-build-engine ... showed me how  to go from change set to work item. 

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.