Forums

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

Filter that will return a list of US that do not have a specific sub-task field?

Margaret Hodges June 28, 2022

I am looking for some help with creating a filter that uses ScriptRunner to return results of all User Stories that do not have a sub-task with a category of QA on it. 

The purpose of this filter is to help show me any US that needs a QA sub-task added to it. As of right now here is what I have started with: issueFunction in parentsOf("issuetype = Sub-task AND "Category[Dropdown]" not in ("Quality Assurance")") - but I know it is incorrect because it keeps pulling US that do have a QA sub-task on the US already. 

Things to know:

  • This needs to work with cloud
  • created a custom field for subtasks called "Category[Dropdown]"

2 answers

1 accepted

0 votes
Answer accepted
Margaret Hodges July 1, 2022

I have figured out the JQL query for this filter. Here is what I am using: 
project = DEMO AND issuetype = story AND Sprint in (##) AND NOT issueFunction in parentsOf("issuetype = Sub-task AND "Category[Dropdown]" in ("Quality Assurance")")

0 votes
Florian Bonniec
Community Champion
June 28, 2022

Hello

 

Have you try something like that ?

 

issueFunction not in parentsOf("issuetype = Sub-task AND "Category[Dropdown]" in ("Quality Assurance")") and type = Story

Margaret Hodges July 1, 2022

Yes, I have tired that JQL query and "issueFunction not in parentsOf" is not supported in cloud. I get this error:

found "not in parentsOf(", was expecting "issueFunction in parentsOf("

Florian Bonniec
Community Champion
July 1, 2022

Hi,

 

I think on cloud, scriptrunner has his own search bar.

https://scriptrunner-docs.connect.adaptavist.com/jiracloud/enhanced-search.html

 

It's not dynamic either, you run the query in script runner then save it, it will store the results but will not be updated automatically if an new issue match your query. 

Margaret Hodges July 1, 2022

Yes, you are correct and I tried that JQL query in the ScriptRunner Enhanced Search and it does not like "not in parentsOf("

Margaret Hodges July 1, 2022

I just figured it out and it using ScriptRunner Enhanced Search and it likes "AND NOT issueFunction in parentsOf("...."

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
TAGS
AUG Leaders

Atlassian Community Events