Forums

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

Help with a JQL filter for custom issue types

Stu
Contributor
April 6, 2018

Hi, I want to create a filter for a board so it shows the following issue types:

  1. Engagements (Epic)
  2. Ideation (Issue Type)
  3. and sub-tasks that belong to ideation issue types.  

Number 3 above is problematic for me as I'm getting all the sub-tasks in my project, and I only want to get ones relating to the Ideation issue type. 

My JQL is 

project = "1 ICS - Engagements" AND issuetype = Engagement OR issuetype = Ideation OR issuetype = Sub-task ORDER BY Rank

Can you advise on how i can do this?  I know I could use a label or custom field for sub-tasks, and filter on that, but I was hoping not to have to do this.

Thanks

2 answers

1 accepted

5 votes
Answer accepted
Tarun Sapra
Community Champion
April 7, 2018

Hi @Stu

Using the default JIRA functionality you can't achieve what you want i.e. queries for sub-tasks of a specific issueType but if you have script runner plugin installed then you can easily do this using the following query 

project = "1 ICS - Engagements" AND (issuetype = Engagement OR issuetype = Ideation OR issueFunction in subtasksOf("issuetype = Ideation")) ORDER BY Rank

 

Stu
Contributor
April 7, 2018

Great answers guys thanks

Stu
Contributor
April 7, 2018

i hope they work for the cloud version

Stu
Contributor
April 7, 2018

@Tarun Sapra thanks for the advice on Script Runner Tarun.  I've installed a trial of it on my cloud instance. 

Then I copied your script above into my filter, but it didn't work.  I also put it into script runner's console, but that didn't work.

It looks a bit complicated.  Are you able to provide some high level steps as to what I need to do get that script that you have above working for my Kanban board? 

I really appreciate your help :)

Stu
Contributor
April 7, 2018

Ignore above @Tarun Sapra i got it to work

Tarun Sapra
Contributor
April 8, 2018

Glad to know that you got it working!

0 votes
Deleted user April 7, 2018

Hi @Stu,

You could use the plugin JQL Tricks. 

The following JQL query should get what you need

project = "1 ICS - Engagements" A ND issuetype = Engagement OR issuetype = Ideation OR issue in parent ("issuetype = '"Ideation")

 Hope this help

Stu
Contributor
April 7, 2018

thanks @[deleted]

Stu
Contributor
April 7, 2018

@[deleted] thanks Danny, I noticed that JQL Tricks is a lot cheaper than Script Runner, but when i search in the Market Place for this I can't find it.  Is this because its not available for Jira Cloud?

 

Thanks

Deleted user April 9, 2018

Hi @Stu,

You are correct, I assumed you were using JIRA Server. Apologies for the misunderstanding.

https://marketplace.atlassian.com/plugins/com.j-tricks.jql-plugin/server/overview 

Script Runner would be my first choice however for JIRA Cloud, due to its flexibility. As you mentioned though it is more expensive.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events