JQL filter

Tomasz Bryła March 23, 2018

Hi,

I have to write a filter that will display to the user subtasks with a specific label and parent tasks that do not have a label like subtask

3 answers

0 votes
Tomasz Bryła March 23, 2018

@[deleted] @NT 

I want to keep the tree structure on the Gantt chart in Big Picture. I have a label that users use for certain tasks or subtasks. In the Gantt program, I display all the tasks and subtasks that have this label. The problem is that if the label is only assigned to the subtask, the parent task in the Gantt chart can not be seen. That's why I would like to use a filter that will display master tasks in addition to subtasks with the label.

Deleted user March 23, 2018

Hi @Tomasz Bryła.

I would suggest you install Script Runner add-on, as it contains many useful built-in functions to perform searches in JQL like the one you are asking about.

The particular function for this add-on you want to use is:

parentsOf(Subquery) - Returns the parents of issues specified by the subquery.

issueFunction in parentsOf("labels in (yourLabel)")

 Hope this helps.

NT March 23, 2018

Unfortunately there no default function available so you have to go for a plugin as suggested by @[deleted]..

There are other plugins also available for enhancing the JQL functionality . You can check the plugins in the market place as per requirement and budget.

0 votes
Deleted user March 23, 2018

Hi @Tomasz Bryła,

Just wanted to confirm, do you mean you require JQL for searching for a specific label on given to sub-tasks as well as standard issue types that do not have the label? 

If so, the JQL would be something like this;

labels = empty AND issuetype != Sub-task OR issuetype = Sub-task AND labels = "Your Lablel".

Hope this helps.

0 votes
NT March 23, 2018

I don't understand your question. Can you please provide specific scenario?

Suggest an answer

Log in or Sign up to answer