Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

How to find Issues with Merged PR

Fabian Ehrentraud
Contributor
June 26, 2018

I'd like to find all open issues that have a merged PR in order to find tickets that might have been forgotten to be resolved and therefore will probably ship to production untested.

JQL has the two terms `development[pullrequests].open` and `development[pullrequests].open`, but unfortunately no means to filter out `declined` PRs. So when I do `status not in (Closed, Resolved) AND development[pullrequests].all > 0 AND development[pullrequests].open = 0`, I will get both issues with `merged` and `declined` PRs. I'd like to only get the ones with `merged` PRs.

Is that possible somehow? If not, could this be added to JQL?

3 answers

2 accepted

9 votes
Answer accepted
Anton Genkin
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
May 13, 2019

Hi @Fabian Ehrentraud 

For Jira Software Server 7.8+ you can find the full list of available development fields here - https://confluence.atlassian.com/jirasoftwareserver/advanced-searching-fields-reference-939938743.html 

To find all the issues only with merged pull requests I recommend using the following filter:

development[pullrequests].merged > 0 AND development[pullrequests].open = 0 AND development[pullrequests].declined = 0

Fabian Ehrentraud
Contributor
May 13, 2019

nice that `merged` now exists! but i'd not filter for `declined = 0`, because it could be that 2 PRs were created for a ticket, one declined and one merged, and these tickets should still show up.

Like jwhite likes this
Deleted user May 29, 2019

@Anton Genkin How do you do this in Jira Cloud? When I try to use development[pullrequests].merged > 0 I get the following error.

For "development[pullrequests]" use "development[pullrequests].all" or "development[pullrequests].open"

Like # people like this
Anton Genkin
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
May 29, 2019

@[deleted] The list of fields available in Jira Cloud is different from Jira Server. 

As of May 2019, Jira Cloud doesn't support development[pullrequests].merged field.

Here is full search reference for Jira Cloud - https://confluence.atlassian.com/jirasoftwarecloud/advanced-searching-developer-reference-967312910.html

Gary Pattenden
Contributor
September 26, 2019

@Anton Genkin Do you know if the merged field is on the roadmap for Jira Cloud ?

Like # people like this
Joel Kleppinger
Contributor
November 6, 2019

 

@Anton it would be very nice to have development[pullrequests].declined and .merged in Jira Cloud.  Any ETA?

Like # people like this
FinAdmin
Contributor
November 9, 2020

WHY all of you is saying that this exists, it DOESN'T

Look:

 

Like # people like this
FinAdmin
Contributor
November 9, 2020

For anyone searching to find merge PRs only: 

development[pullrequests].all > 0 AND development[pullrequests].open = 0

 

it will include the merged and declined tho, there's no other way.

 

 

Like # people like this
Joel Kleppinger
Contributor
November 9, 2020

@FinAdmin That only works if PRs are never declined.  If there are multiple rounds of PRs that get declined and none ever gets merged, your query will return that result.

Above @Anton Genkin mentioned that Jira Server supports .merged but Jira Cloud does not.  I presume you ran your test on Jira Cloud.

It's been 1.5 years, @Anton Genkin can we get .declined and .merged in Jira Cloud soon?

Like # people like this
Alison Meng
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
May 10, 2021

And it has been 6 more months. How about we get .merged in Jira Cloud now?😜

Like # people like this
Alix Mougel
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
August 19, 2021

And it has been 3 more months. How about we get .merged in Jira Cloud now?

Like # people like this
Larkin Rogers
Contributor
September 20, 2021


development[pullrequests].open > 0

This works, but not merged or declined, still looking to know how to filter for these, in case anyone knows

Like CKinKC likes this
CKinKC
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
January 19, 2022

Same, is anyone aware of a feature request for this.  It's very frustrating, thank you!

Matt Leach
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
September 22, 2022

9 months later. How about we get .merged in Jira Cloud now?

Like # people like this
Dejay Clayton
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
October 31, 2022

Jira is a big, fat company.  They have the market share such that their product managers don't have to worry about keeping customers happy.  Thus, if it takes five years to implement something that should take five minutes, it takes five years!  And you'll sit there and like it!

Like Hans Ashlock likes this
Will Sargent
Contributor
November 17, 2022

This combo JQL will find all tickets with merged pulls, assuming they also have no open PR's as well (combo merged and open, same issue)

development[pullrequests].all > 0 and development[pullrequests].open = 0

Like # people like this
Ruan Heyns
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
September 19, 2023

I think @Anton Genkin might have left this god awful company, and still this has not been resolved for Jira Cloud

Deleted user February 5, 2024

It is almost 5 years since the request. How about we get .merged in Jira Cloud now?

Like # people like this
YarnSawe
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
August 29, 2024

Another 6 months gone, 2256 days since the ticket originally filed. How much longer do I need to wait for .merged in Jira Cloud?

Like # people like this
Bryan Hoang
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
December 25, 2024

Getting `.merged` for Jira Cloud would be a lovely Christmas present!

Ajay Adhawade
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
March 14, 2025

Hello Everyone,
Just joined the community. 
To report on the E-2-E engineering process and Merge is part of that process, I am not sure why it's taking years for JIRA PMs to understand and consider this as the priority.

It's shows up on their documentation - 

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

Like Joel Kleppinger likes this
1 vote
Answer accepted
Caterina Curti
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
June 27, 2018

Hi @Fabian Ehrentraud,

It seems like this behaviour matches what is described on the following feature request (this is the Jira Server version):

JQL Entity Property for Pull Request Status

 

If that's the case, feel free to comment on the feature request to share with the Jira team the use cases for this request.

 

Cheers,
Caterina - Atlassian

Fabian Ehrentraud
Contributor
June 27, 2018

Thank you, that indeed looks like a feature request for what I try to do. Too bad that it is not possible yet.

Like Monica.Day likes this
Caterina Curti
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
June 27, 2018

Thanks Fabian for commenting on the feature request. Really appreciated!

0 votes
Ahmad Salah August 20, 2020

Having status property is a should have feature,
I guess atlassian removed it for a purpose

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events