List of Jira Issues connected to a build plan
Asked by Norbert:

We use Bamboo 5.3 and Jira 6.0  
Is there a way to get all the connected Issues to a build plan (not only for every single build extra)?? Similar to the release funktionality.

Reason:  
We have a release and branched in the Sourcecode   
We work on a new release but we do some bugfixing on the branch.   
The Issues for a Bugfix belong to both versions (I know this is not perfect ...)  
Now i would like to have a overview of ALL issues related to an branch. (or the branched build plan)


Answers:
author: Gretchen
body: You may have to pull the information from your repository. (since that's how Bamboo knows an issue is related to a build it should be there). If you're using SVN you can do an query on the logfiles for the branch (limit by revision if you like).

We use something like this (substitute the dollar variables with actual values for your purposes - this was written for perl complete with authentication stuff a simple "svn log" will get you the basics from the command line):

\`svn log -v -r $rev1:$rev2 $branchURL --username $svn_user --password $svn_password --no-auth-cache --non-interactive --trust-server-cert --config-option servers:global:http-auth-types=BASIC\`;

This gives output with the log contents including revision, user, date, time, files, and comments.

The comments should contain the jira ticket numbers.

If you remove the -v you just get the revision info and the comments (no files listed)

You can filter it further using regular expressions in a script.

As far as I know all the JIRA details associated with bamboo is tied to the individual builds and not accessible for a plan.

For example this:.../rest/api/latest/result/PRJ-PLAN.json will get you a list of builds which (if you were really clever with scripting and regex) could be used with .../rest/api/latest/result/PRJ-PLAN-BLD.json?expand=jiraIssues to get the individual issues for each build. Again extracting them from all the other stuff that is delivered in that result.


author: shari_anderson
body: If that's the case you can do a "Release Report" from Fisheye.

comments: author: Norbert
body: Not using fisheye...

thats the reason I ask for a way to do it in Bamboo (or in Jira if its possible there)


author: Pablo Beltran
body: @Nobert,

[Subversion ALM](https://marketplace.atlassian.com/plugins/com.kintosoft.jira.subversion-plus) supports this.

You can make a query on JIRA by using the supported **svnItem** JQL function.

For instance:

*issue in**svnItem**("/foo/","",1)*

it would return all the issues having commits in the *foo* branch and all its subdirectories.

You might also want to filter by commit date

*issue in **svnCommitDateRange** (1,"2014-01-15", "2014-01-31")*

it would return all the issues having commits between both dates (from - to)

And you might also want to filter by the BUG issue type.

So the final resould would be:

type="BUG" and *issue in **svnCommitDateRange** (1,"2014-01-15", "2014-01-31") and* *issue in**svnItem**("/foo/","",1)*

*In*In fact, all the registered Subversion repositories are fully indexed by Subversion ALM and you can filter by any Suversion attribute (revision numbers, authors and many more).

ThPlease, read the user guide in order to get more accurated details about the supported JQL functions and how to use them.

Hope this helps.


author: Norbert
body: thanks for the support, to sum it up!

The answer would be "No its not possible" but...  
there are workarounds via Fisheye or Subversion/Git


author: shari_anderson
body: If you look at the Build Summary tab in Bamboo, it will show the code commits mapped to each Jira ticket.


author: shari_anderson
body: Correction - you'll need to click on the Jira ticket in Bamboo, then go to the Source tab in Jira to see the affected files. Hope this helps.

comments: author: Norbert
body: Thanks for the response but this i know already.

I would like to get an overview of "ALL" ticktes related to a plan/branch With the solution you descrive I have to manually click through all tickets/builds an copy the Jira numbers :-(

As mentioned above, a report like the "Release Notes" report would be nice