Forums

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

Filtering User Storys through 2 issueFunction

Deleted user March 10, 2022

Hello,

i have a (maybe weired) Question :) 

 

Is there a possibility to set up a Filter to get only particular User Storys:

- The User Story inherits a Testcase

- This Testcase is part of a Testplan

 

What i need is: I need all User Storys, wehere the Testcases are part of a particular TestPlan.
Is this maybe possible with two issueFunctions?

How could the JQL be seems like? Somthing like: 
issuetype = Story AND issueFunction in linkedIssuesOf("issuetype = Test AND issueFunction in linkedIssueOf(TestPlan = 123))

Thanks in advance

 

1 answer

0 votes
Crystelle S
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
March 14, 2022

I see you are using scriptrunner, if all of these are ticket types, that should work. If it is not, could you speak more about the Testcase and the Testplan... are those indeed issuetypes in Jira? What happens when you run the above?

Deleted user March 18, 2022

All of these are Ticket Types respectivly issuetypes.

My JQL from above do no work, because i get i Error Message in Terms of Syntax:
--> Error in the JQL Query: Expecting ')' or ',' but got 'issuetype'. (line 1, character 109)

I tried also this one:

issuetype = Story AND issueFunction in linkedIssuesOf("issuetype = Test AND issueFunction in linkedIssueOf("issuetype = "Test Plan" AND key = 1238")")

And again the same Error: 

--> Error in the JQL Query: Expecting ')' or ',' but got 'issuetype'. (line 1, character 109)

Crystelle S
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
March 18, 2022

It's going to sound really weird but give this a try - swap out your quotes to single quotes:

...issueFunction in linkedIssueOf('issuetype = "Test Plan" AND key = 1238')")

This sometimes works for me, I can't explain it (maybe a developer could since I am sure it has something to do with how the program reads the expression but that's not me :) )

Crystelle S
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
March 18, 2022

Or maybe avoid the nested function altogether and save the second bit as a filter and just write it

issuetype = Story AND issueFunction in linkedIssuesOf('issuetype = Test AND filter = ""')

Also there is this thread that might help - https://community.atlassian.com/t5/Marketplace-Apps-Integrations/ScriptRunner-nested-query-select-issues-from-epics-linked-to-an/qaq-p/777719

Talks about putting in "\" to escape the quotes of a nested function.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events