It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

JQL to find the issues that have code commits

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 !

4 answers

1 accepted

13 votes
Answer accepted

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

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

Like Aida Real likes this

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

Where did you find this in the docs?

Like # people like this
Like Aida Real likes this

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

zuck3rman I'm New Here Aug 15, 2019

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

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 Aida Real likes this

Thanks for the update Adam!

Like Adam Wride likes this

@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

2 votes
Chris Fuller Atlassian Team Sep 28, 2015

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

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

Chris Fuller Atlassian Team Sep 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

Chris Fuller Atlassian Team Sep 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

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

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

It should be 

issue.property[development].commits > 0

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

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

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

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

Like zuck3rman likes this

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

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

issue.property[development].commits > 0

Perfect!   Thanks this works wonders!

Thank you for your jql request!

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?

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

Suggest an answer

Log in or Sign up to answer
Community showcase
Published in Jira

The add-in you’ve been waiting for: Jira Cloud for Excel 🙌

Introducing Jira Cloud for Excel Here at the product integrations team at Atlassian, we are thrilled to announce the new Jira Cloud for Excel add-in! This add-in lets you export Jira data directly ...

838 views 5 22
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you