Is it possible to query Jira and find all issues that have a Stash pull request associated to them? I see the pull request show up in the "Development" panel when I navigate to a story with an associatied pull request, but I can't figure out if I can actually query for them or not.
I'd like to be able to run this to help track which stories were code reviewed using a pull request. Thank you!
Found something. To sum up - you can query for:
issue.property[development].commits
issue.property[development].prs
issue.property[development].openprs
issue.property[development].reviews
issue.property[development].failingbuilds
With the proper combination you can get what you want - for example, merged pull requests :
issue.property[development].prs > 0 and issue.property[development].openprs = 0
etc.
Hope this helps. Still don't know how to query for succeded builds.
issue.property[development].prs > 0 and issue.property[development].openprs = 0
that does not represent merged pull requests unfortunately, as they can be declined, and this query will still return true. Still looking.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Have you found a solution for excluding Declined PRs?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Vote on this feature request to fix this issue
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Try this.... issue.property[development].commits > 0 AND issue.property[development].prs > 0
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Todd Ross Great! It works perfect. Just wondering, why query for 'issue.property[development].commits > 0'? When you have a pull request open, you always have commits associated to your JIRA issue?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Todd Ross And while we're add it. Could you point me to a URL with info about issue.property syntax. I'm wondering if I can also query for open pull requests.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Ari Brown No, but it works with just issue.property[development].prs > 0. Unless I'm mistaking, you always have a commit associated when you have a pull request, so no need to check for commits.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks Rudy - From what I know from standard JQL and what I can figure out that makes sense. Unfortunately I can't get anything to return when using that syntax and I'm wondering what, if anything, it requires. We've got stash, but is the issue.property[development].commits or prs more specific than that? Does it only work with certain types of repos? What other items might return info for me? Would love to understand the syntax better.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
For your info Ari, we use JIRA 6.4 and Stash 3.10. What I understood from some info I found on developers.atlassian.com is that it has been added to JIRA 6.2. Are there types of repo's? (Accept for bare and normal?) Just wondering do you see a development panel in JIRA?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I've got Jira 6.3.9 and Stash 3.6.0. Should be fine on Jira, unless our stash version is too old... I don't think there are any other types of repos - I'm just surprised that I'm getting nothing here.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
That format of JQL is only supported in JIRA 6.4 and above. It is not a publicised feature due to the fact it has a number of caveats that impact its usability. The information in JQL is only optimistically updated assuming you have JIRA and Stash connected via Applinks correctly (see https://confluence.atlassian.com/display/STASH/Linking+Stash+with+JIRA and https://confluence.atlassian.com/display/JIRA/Integrating+JIRA+with+Stash). In certain cases, changes in Stash will not be updated in JIRA unless you manually view the issue or view it as part of release hub https://confluence.atlassian.com/display/JIRA/Checking+the+progress+of+a+version. These cases are: * When JIRA is down or unreachable * When a repository is pushed to Stash with a lot of issues mentioned in the commits Hope this helps explain things
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Is there a method to find merged PRs in issues? Is there more documentation on precisely what is in `issue.property[development]` ?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
No if you google you get referred to this link: https://developer.atlassian.com/jiradev/jira-architecture/building-jira-add-ons/jira-entity-properties-overview#JIRAEntityPropertiesOverview-Example2:Retrievingdata which does not help me. but ssue.property[development].failingbuilds is one that works, so if you do find others (succeeding build, branches?) please drop a comment Rudy
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Seems like this has changed to be:
development[pullrequests].open > 0
Other examples based off the error responses:
Available properties are "development[pullrequests]", "development[commits]", "development[reviews]" and "development[builds]" For "development[pullrequests]" use "development[pullrequests].all" or "development[pullrequests].open"
etc.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Jay Sachdev, which version of JIRA is that?
Because it does not work on JIRA 7.3.1, do you have some add-on installed?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
This post confirms this syntax. I've tested this out on JIRA cloud and it works.
Orphaned changes: development[pullrequests].all = 0 AND development[commits].all > 0
Unmerged changes: development[pullrequests].open > 0 AND development[commits].all > 0
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
For Jira Software Server you can find the full list of available development fields here - https://confluence.atlassian.com/jirasoftwareserver/advanced-searching-fields-reference-939938743.html
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Anton Genkin, your confluence link doesn't seem to be working.
Also, may you provide the exact syntax. I am unable to make it work and would appreciate an example.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@alexmears If you use Jira Software 7.8+ integrated with Bitbucket, then the following syntax will work:
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
issue.property[development].commits
issue.property[development].prs
issue.property[development].openprs
issue.property[development].reviews
issue.property[development].failingbuilds
Jira Cloud - no one from filters do not works(
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
When you do find out, I'm very interested in how. We can really use it for e.g. automatic transition of an issue (e.g. to review when a pull request starts).
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Automated issue transitions are described here: https://confluence.atlassian.com/display/JIRA/Configuring+workflow+triggers
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
i found a relevant (i think) proposal for this - https://jira.atlassian.com/browse/BSERV-4048
it would be helpful if people interested in this voted for the issue
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I would also be very interested in knowing the properties that I can search for by issue.property[development].. as our main problem is to know which issues are ready for testing (have MERGED pull request).
Also I would like to know which issues will be included in the next build (example have issue.property[development].builds < 0 - unfortunately this does not work)
Generally I lack the functionality to query JIRA for properties that are stored in joined applications (stash, bamboo etc.)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You may find this useful: fixVersion = earliestUnreleasedVersion()
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.