It's all about the answers!

Ask a question

Ant task to associate an existing work item with a build?


Cliff Gardiner (921234) | asked Jan 28 '15, 7:52 a.m.
edited Jan 28 '15, 10:12 a.m. by Ralph Schoon (63.5k33646)
We have a hands-off build process that mandates a work item to record the build against, but following a successful build we have to manually click on 'Associate an existing work item' to tie the build result to the work item.  We have CLM 4.0.7 but I can see in the docs that this is also true for 5.0.2.

I would like to do this programmatically in the build file but the supplied Ant tasks don't provide this.  If anybody knows a method to do this I'd be delighted to hear, or if they have developed a custom Ant task that they'd be prepared to share.  My only other recourse is to request a product enhancement and that could take months or years, assuming it's accepted as 'a good thing to do'!

Can anybody help?

Accepted answer


permanent link
Ralph Schoon (63.5k33646) | answered Feb 27 '15, 4:20 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
I tested and realized I got the direction of the build links wrong. Here is the fixed version.
Ralph Schoon selected this answer as the correct answer

5 other answers



permanent link
Ralph Schoon (63.5k33646) | answered Jan 28 '15, 8:22 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
edited Jan 28 '15, 8:25 a.m.
Cliff,

I created a work item command line https://rsjazz.wordpress.com/2015/01/12/a-rtc-workitem-command-line/ that can do it. I am currently working on a next version that fixes some bugs and enhances the capabilities. The current version should at least allow you to create a work item including that link from the build result ID.

permanent link
Cliff Gardiner (921234) | answered Jan 28 '15, 9:54 a.m.
Thanks Ralph,

I'll have a look.  We don't need to create the work item, just the link but what you're describing should do the trick.

Comments
Ralph Schoon commented Jan 28 '15, 9:57 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER

If you have the work item ID, you can modify the work item and create the link too.


permanent link
Cliff Gardiner (921234) | answered Feb 26 '15, 11:17 a.m.

Hi Ralph, this is great and very close to what I'm after.  However using link_reportAgainstBuild to link the build result to the work item creates in the work item a link type of 'Work items reported against this build' rather than 'Reported Against Builds', which is what I really want.  A further problem is that this link type does not appear in the Quick Information and there is no option I can find when editing the Quick Information to make it appear. 

Have I missed something, or do I need to get to grips with amending WCL?


Comments
Ralph Schoon commented Feb 26 '15, 2:13 p.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER

What link type do you need? Can you provide a screenshot from the links tab and the overview tab? 


permanent link
Cliff Gardiner (921234) | answered Feb 27 '15, 4:29 a.m.
Many thanks Ralph.  There are download restrictions where I work but I'll try this as soon as I can get the code on site.

Comments
Ralph Schoon commented Feb 27 '15, 4:43 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER

Thanks for helping with testing. I just can't get all kinks when testing myself.


permanent link
John Carew (1324) | answered Jun 02 '17, 7:53 a.m.

Hi Cliff, Ralph is it possible to get a copy of the implementation you created for updating a specific workitem with a link from the build. So that as you execute the JBE ant script, the build links itself to the 'Reported Against Builds' of a specific work item.

Thanks.


Comments
Ralph Schoon commented Jun 03 '17, 10:51 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER

For all I know you could use the work item commandl line, as already explained above.

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.