Hello,
Can someone help me to write a JQL search for the following query:
In a given project (PRO1), I want to list all the issue types A (MIR) that have at least one link (link = "is MIR of" ) to an issue type B (SRS), but only the SRS in status APPROVED
I started to write:
project = PRO1 AND issuetype = MIR AND issueLinkType = "is MIR of"
but I don't know how to integrate the filter on the SRS' APPROVED status.
Any idea?
Hi @CécileV ,
I'm not sure if this can be done without the Scriptrunner app, but if you have that, you could use
project = "PRO1" AND issuetype = MIR AND issueFunction in linkedIssuesOf("issuetype = SRS AND status = approved", "is Mir of")
Hope this helps!
- Tessa
Hi Tessa, thanks a lot for your fast reply.
I got this error message: "Error in the JQL Query: Expecting ')' before the end of the query."
I place the ")" at the end, first, the result didn't show any issue.
I placed it after approved", then I got a error message again.
However, I know the result should not be empty...
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @CécileV ,
just to be sure, you do have scriptrunner on your instance?
Could you copy paste your JQL to here? Perhaps add a screenshot in there as well?
Maybe the screenshot of an issue of which you are sure to match the conditions mentioned?
The one I posted seems to work for me, so I'd like to check what is different.
Keep in mind, this query will find issues that:
- Are in project PROJ1 +
- Are of the issuetype MIR +
- Are linked to issues of issuetype SRS that are in status approved with the "Is Mir of" link
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Yes Tessa, I confirm we have Scriptrunner.
I also confirm that what you mention as a result is what I expect.
But here is what I get (screenshot)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @CécileV ,
Thanks for the screenshots, I see the problem now!
Let's revisit the JQL:
issueFunction in linkedIssuesOf("issuetype = SRS AND status = approved", "is Mir of")
This part of the JQL says, find me linked issues of .....
So this part of the JQL talks about the linked issue, not the issue you ant to find.
As you might know, issuelinks have a name, and 2 parts, an inward, and an outward part:
In your JQL you ask for issues linked with "Is MIR of", yet in the issue you are looking for, the link is "Is MIR of".
Could you check the linked issue itself (PFM-3949) and check what the other half of the link is called?
That's the name you should add to the JQL ;)
Let me know if this works!
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.