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 no of code commits, pull request associated with each issue

issues that have code commit we can use the below JQL

development[commits].all > 0

How can I find the no of code commits, in each issue Like (JIR-100 - 3 commits, 1 pull request, and JIR-101 - 2 commits, 1 pull request)

1 answer

For that you need SQL query  like below


project.project_key AS "PROJ_KEY", AS "REPO_NAME",
repository.slug AS "REPO_SLUG", AS "PR_ID",
sta_pull_request.title AS "PR_TITLE",
cs_attribute.att_value AS "JIRA_KEY"
INNER JOIN repository ON (sta_pull_request.from_repository_id = OR (sta_pull_request.to_repository_id =
INNER JOIN project ON (repository.project_id =
INNER JOIN cs_attribute ON (sta_pull_request.from_hash = cs_attribute.cs_id) OR (sta_pull_request.to_hash = cs_attribute.cs_id)
WHERE cs_attribute.att_name = 'jira-key';

@Muhammad Ramzan  Thank you, we are using cloud version, let me know how can I use SQL query in that?

Suggest an answer

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

Demo Den Ep. 7: New Jira Cloud Reports

Learn how to use two new reports for next-gen projects in Jira Cloud:  Cumulative flow diagram and Sprint burndown chart. Ivan Teong, Product Manager, Jira Software, demos the Cumulative ...

274 views 1 2
Join discussion

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