JQL to find the issues that have code commits

Kota Sreenivasa Shravana Kumar September 28, 2015

Hello,

 

Is there a way to have a JIRA query (JQL) to find the list of issues that has code commit associated with it ? 

Please advise. 

Thanks !

5 answers

1 accepted

19 votes
Answer accepted
Aida Real October 10, 2017

This works for me: development[commits].all > 0

Jeremy October 20, 2017

This worked for me. None of the others did. Thanks, Aida!

Like # people like this
Fowler February 26, 2018

This works for me as well - please update this to be the "accepted" answer. Maybe the old syntax, `issue.property[development].commits > 0` worked in older versions, but this seems to be the syntax for "current" (as of Feb 2018) for JIRA Cloud.

Many Thanks!!!

Like Aida Real likes this
Christian Sakai July 26, 2018

Where did you find this in the docs?

Like # people like this
Magdalena Michalak
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
May 10, 2019
Like Aida Real likes this
Aida Real May 10, 2019

Not really, I found it in StackOverflow I think. Fortunately, the docs are updated now and they are more complete than ever ;)

zuck3rman August 15, 2019

development[commits].all > 0  - perfect, thanks a lot!!!

Like Nir Ofri likes this
Adam Wride
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
September 16, 2019

Note that as of today (September 16, 2019):

development[commits].all > 0 

works only for Classic Jira projects. NextGen projects do not appear to support this JQL feature.

Like # people like this
Aida Real September 17, 2019

Thanks for the update Adam!

Like Adam Wride likes this
sgautrin September 19, 2019

@Magdalena Michalakas of today (2019-09-19) at least, it is not in the page you linked: that page has no reference of either “property”, “development” or “commits”.

Additionally, the `development[commits].all > 0`  query works (at least for classic jira projects), but is marked by jira as invalid (red cross instead of green check), and prevents JQL autocomplete from working if you want to add other criteria.

Edit: found it in the documentation in another page I found via a thread linked to this one: https://confluence.atlassian.com/jiracorecloud/advanced-searching-developer-reference-967312946.html

Like Mateusz Przybyłek likes this
Dibyendu Mukherjee November 28, 2019

This document is not accessible, it's not opening. Issues are not having property called development...

Magdalena Michalak
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
November 28, 2019
Like Brad Mace [ATS] likes this
Adina Simu December 13, 2019

@Magdalena Michalak The page you've indicated covers Bitbucket, Bamboo, Crucible; is Github supported? I am seeing weird behavior when querying for "development[commits].all > 0" in my Jira instance with Github integration. 

Casey Maynard February 20, 2020

My apologies for the noobness of the reply.

I am looking for a JQL query that will list the branch that was referenced in a Git Commits (or Git Roll Up). 

The "development[commits].all > 0" does not seem to pull any results.  My guess is I need to refine the criteria, but it is not clear where I should begin.

BTW: We use the JIRA server, not a cloud version.

And please no Add-on solutions, as Add-ons are not affordable nor sustainable over the longer term of our projects.

Like SB likes this
Adam Wride
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
February 20, 2020

Hi @Casey Maynard -

I see you are looking for a Jira native solution - but I see you mentioned "Git Roll Up" issue tab which is specific to the Git Integration app that we make. Do you have that app installed?

Casey Maynard February 20, 2020

My guess is Yes we have Git Roll Up (is GIT Commit also part of this same Git integration app?) installed in JIRA.  I am familiar with GIT usage, as I am mainly the Confluence person, but my team needs a way to track the GIT commits and merging branches into master all of the Commit branches for a specific Epic(s).

Adam Wride
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
February 20, 2020

Hi Casey -

Yes, the Git Commit issue tab and Git Roll Up issue tab are both from the same Git Integration app. The latest version is v3.4.3.

 

The app has two options for JQL searching (for Jira Server and Data Center):

gitCommitsReferenced

gitBranch

 

Examples:

gitBranch in (master) AND resolution = Unresolved 
gitCommitsReferenced is not empty AND resolution = Unresolved

More documentation: https://bigbrassband.com/git-integration-for-jira/documentation/jql-searching.html

Note: there is a hard limit currently on JQL searching of 65,000 Jira issues with commits. We'll be addressing this limitation later this year.

If you have any specific follow up questions - you can reach us at support@bigbrassband.com

Cheers,

Adam

Like Casey Maynard likes this
Chris McGuire March 19, 2020

@Adam Wride I see that this article only references Jira Server.  Is there a JQL method for Jira Cloud? 

Chris McGuire March 19, 2020

@Adam Wride This article appears to only be applicable to Jira Server.  Is there a method for JQL queries in Jira Cloud? 

Adam Wride
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
March 19, 2020

Hi @Chris McGuire -

Indeed - the above article is for Jira Server/Data Center.

For Jira Cloud - you can reference this article: JQL searching for commits and pull requests

Chris McGuire March 19, 2020

Thanks for the quick reply, @Adam Wride   Unfortunately, using the method described on this page does not seem to be helping (ie. development[commits].all > 0).  I'm curious - does the following option have to be enabled in order for this to work properly? 

"Send Development Information to Jira Cloud"

Adam Wride
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
March 19, 2020

Hi @Chris McGuire -

Correct, you will need "Send Development Information to Jira Cloud" enabled (which is the default for new installations - but if you installed the app more than a few weeks ago - you'll need to enable it in the General settings of the app).

Note: you will likely want to reconnect your repositories/integrations after enabling that setting so that all the commits/branches/pull requests get included.

Like Chris McGuire likes this
2 votes
Shadd Schutte July 15, 2020

You can find the development functions for JQL at the url below it all depends if you have your dev tools linked to Jira.

 

https://confluence.atlassian.com/jirasoftwareserver/advanced-searching-development-fields-reference-973491363.html

2 votes
Rose Cruz July 23, 2016

@Tobias Schönit's jql worked for me. Thanks!

issue.property[development].commits > 0
CSaxon August 12, 2016

Perfect!   Thanks this works wonders!

Gonchik Tsymzhitov
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
October 24, 2016

Thank you for your jql request!

2 votes
crf
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
September 28, 2015

I believe you can do this with JQL.  Try adding "issue.property[development].commits is not empty" to your query.

Kota Sreenivasa Shravana Kumar September 28, 2015

Thanks for your immediate help. Query does not yield any results. I am trying the following in JQL. Is there anything wrong ? project = "Advanced Planning" and issue.property[development].commits is not empty No issues were found to match your search Try modifying your search criteria or creating a new issue

crf
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
September 29, 2015

It would rely on on you having set up the integration between JIRA and your source control system. The information for that JQL comes from the same source that makes the number of commits and branches show up in the developer status area. See these two links: * https://confluence.atlassian.com/jira/integrating-jira-with-code-development-tools-395707042.html#IntegratingJIRAwithCodeDevelopmentTools-Developmentpanelonissues * https://confluence.atlassian.com/jira/streamlining-your-development-with-jira-443548553.html

crf
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
September 29, 2015

However, it's also worth noting that this information is updated rather lazily, as well. See this answer for a bit more about this: https://answers.atlassian.com/questions/20644626/answers/21631644

Kota Sreenivasa Shravana Kumar September 30, 2015

There is already a integration setup between our STASH and JIRA instance.

Moshe E April 13, 2016

Works for me when I use equals, greater or less combination. However, it did not work with is or is not empty. 

Tobias Schönit May 11, 2016

It should be 

issue.property[development].commits > 0
Kota Sreenivasa Shravana Kumar May 30, 2016

It does not work for me. It says, No issues were found to match your search

April May 25, 2017

I think the trouble you're having might be the > displayed here; probably different browsers render this page differently.

For Jira, that should be changed to the 'greater than' symbol, like this:

issue.property[development].commits > 0
Vaibhav Parikh September 15, 2017

not working for me. Are there any special settings to get it worked?

Fowler February 26, 2018

@Vaibhav Parikh: Check out the response from @Aida Real above and try `development[commits].all > 0`

Like zuck3rman likes this
Vaibhav Parikh February 26, 2018

Thanks Patrick. That worked.. I was trying with issue.property[development].commits. Great help.. thanks

1 vote
Peter Kahn February 28, 2019

Looks like JQL changed at some point

This works well

development[commits].all > 0

 Anyone know how to limit that to a specific branch... like master?

Gonchik Tsymzhitov
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
February 28, 2019

Yeah, the function was changed. Let's check feature request in jira.atlassian.com

Suggest an answer

Log in or Sign up to answer