Defects to "ready to verify" state when included i
My team's been using RTC for a while now, and liking it, but some of our testers have one feature from CMVC that they miss. What they would like is for defect work items to move into a "ready to verify" state automatically when their changesets are included in a successful build (ie there is something there for the tester to verify).
I'd like to add this facility. Not being a naturally RESTful person, I've downloaded the plain Java work item API, but without an existing mental model of the system it's quite an intimidating wall of code. I hope that someone here can give me some pointers of where to start. My assumed approach is to write an Ant task that will be added to our build script. It will have to find out which work items were included in the build, either from information passed to the build script, if available, or by calling back to RTC. Then, once the build has been successful, it will need to call RTC again to move the work items into "ready to verify" state. I realise that "work items included in the build" isn't trivial; I guess I mean that all changesets currently associated with the work item are in this build; either new to it or having been delivered some time ago. Pointers to how to achieve my approach above are welcome; even more welcome is advice on a better way to do it. Cheers, Pete |
13 answers
My team's been using RTC for a while now, and liking it, but some of In general, functionality similar to what you are planning is implemented using a Participant. I am not very familiar with the Build infrastructure, but I assume that some kind of post build participant can be implemented. In the implementation you could query for all work items that have an 'included in build' link that points to the build that just finished and change their state. -- Regards, Patrick Jazz Work Item Team |
I'm not too worried about inserting my own behaviour into the build - that's just normal Ant and Java which I can do. I will look up Participants, but this isn't the core of my problem.
Yes, this sounds like exactly what I want to do - the problem is that I don't know how to do it. I can't find any good overview of how to use the Java API I've downloaded, so I don't know where to start. Any chance you could give at least a brief example of querying for work items having a link? Cheers, Pete |
Note that although I talk about the Java API because that's the technology I'm comfortable with, I don't rule out using the REST / Web stuff if that makes more sense. I might just need slightly more help to use it :-)
Pete |
Geoffrey Clemm (30.1k●3●30●35)
| answered Jan 29 '10, 1:38 p.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
I believe that the only Participant contribution points currently are at
request/cancel/abandon build time, not at build completion time. So I believe you need to do these kinds of post-build operations in your build step (using the SCM command-line), rather than using Participants. I've submitted work item 104659, to request process enabling the "build done" operation. Cheers, Geoff Patrick Streule wrote: My team's been using RTC for a while now, and liking it, but some of |
Yes, this sounds like exactly what I want to do - the problem is that There is a Wiki page that gives an introduction to querying work items: https://jazz.net/wiki/bin/view/Main/QueryDevGuide An AST predicate that selects all links that refer to a build with a specific name could look like this (untested example): AuditableLinkQueryModel.ROOT.targetRef().referencedItem()._target(BuildResultQueryModel.ROOT).label()._eq(name); -- Regards, Patrick Jazz Work Item Team |
I believe that the only Participant contribution points currently are at Thanks - I had assumed that this would be some standalone Java run as a build step, so the lack of Participants is not a problem for me. If the API is anything like the work item one, any savings I might gain by reuse would be more than outweighed by the time taken figuring out how to use it :-) I don't see where the SCM command line comes in - I don't need to do anything with source code. Just identify which build I'm running as part of (which must be possible, since our other steps use build names for directories and so on), run the work item query to see which items link to this build, then update them as required. Cheers, Pete |
Thanks - I'm sort of stumbling through although I'm not yet in a position to actually run this. What would really make a difference is having the Javadoc - surprisingly it isn't included in the JazzPlainJavaClient download. Is there somewhere I can download it in a form suitable to load into Eclipse? Cheers, Pete |
Geoffrey Clemm (30.1k●3●30●35)
| answered Feb 01 '10, 6:08 p.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
You'll need at some point to invoke SCM operations to help find the list
of work items in the build, because I believe there is no work item API for finding work items that are in the build (the links are from build to snapshots, and from snapshots to change sets, and finally from change sets to work items). But it is true that you might want to use the SCM Java API rather than the SCM command line, since you'll be using the Java API to access the work items anyway. Cheers, Geoff PeteVerdon wrote: gmclemmwrote: |
You'll need at some point to invoke SCM operations to help find the list I thought the query that Patrick posted was supposed to find all work items included in a particular build? Pete |
Geoffrey Clemm (30.1k●3●30●35)
| answered Feb 02 '10, 5:53 p.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
Patrick's query was for all work items that "refer" to a particular
build, where "refer" means work items that were explicitly linked by an end user to that build (for example, you can submit a new defect against a build, and that new defect will "refer" to that build). The work items I was talking about were those that contained change-sets that contributed changes to the build ... there are not explicit links from the build object to those work items. Patrick: Correct? Cheers, Geoff PeteVerdon wrote: gmclemmwrote: |
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.