How to filter a parent ticket

Alfred Tan November 23, 2017

Hi,

 

How can we filter a parent ticket from the same issue type?

The reason behind is if we have a Problem Report ticket from customer will usually leads to many cloned tickets.

When come to reporting, this will somehow causing misunderstanding to the management that the project has many Problems.

If we can have a filter to sort for the parent ticket, it would be great.

 

Look forward to your reply.

 

 

 

 

 

1 answer

1 vote
Alexey Matveev
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.
November 23, 2017

Hello, 

I guess your parent issue is linked to a child issue by a link. There is an out of the box JQL function

issue = linkedIssues(issuekey, linktype)

but it is not flexible enough because you need to pass an issue key.

There are more flexible JQL functions in Adaptivist Scriptrunner plugin. For example, linkedIssuesOf(Subquery, link name). You can read more here

https://scriptrunner.adaptavist.com/latest/jira/jql-functions.html#_linkedissuesof

Alfred Tan November 23, 2017

Thanks Alexey...

I have problem to attach a screenshot. Could you advise on this?

This will definitely help me to elaborate my issue to you.

Alexey Matveev
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.
November 23, 2017

What is the problem? I never had problems with it.

Alfred Tan November 23, 2017

Ticket relationship.JPG

Alfred Tan November 23, 2017

I was not able to click the insert button. Now it's fine.

 

From the screenshot, how can we short the parent ticket? IBBI-2604.

Alexey Matveev
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.
November 23, 2017

What report is it?

Alfred Tan November 23, 2017

I would like to know how the create a filter to sort the parent ticket (IBBI2604).

For reporting, we will be using the Dashboard, 2 dimensional filter. The number will be misleading as the main ticket is IBBI-2604.

Report.JPG 

Alexey Matveev
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.
November 23, 2017

I guess it would be like this

issueFunction in linkedIssuesOf("", "is parent of")

You would select all issues which have is parent of  link. I guess that would be all parens. 

Alfred Tan November 28, 2017

Capture.JPG

I am stuck.

Could you advise how to proceed?

Alexey Matveev
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.
November 28, 2017

In the search field instead of 

issueFunction in linkedIssuesOf()

type this one

issueFunction in linkedIssuesOf("", "is parent of")

Alfred Tan December 4, 2017

I am sorry Alexey,

I am still lost.

Alfred Tan December 4, 2017

Capture.JPG

 

The filter shall only filter out all the purple tickets. Issue type = ChM Tasks.

Alexey Matveev
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.
December 4, 2017

You can add condition for the issue type 

issueFunction in linkedIssuesOf("", "is parent of") and issuetype=ChM 

Alfred Tan December 4, 2017

Hi Alexey,

Thanks for the prompt response.

The above is useful.

 

I do have another scenario here.

What if the we clone the ticket for other disciplines and now we would like to look for the only the origin of the ticket?

Capture1.JPG

Alexey Matveev
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.
December 4, 2017

Issue links have two directions. You can find it in cog item -> issues -> issue linking. For example, link Cloners has two directions "clones" and "is cloned by". If you want to get all issues from which other issues were cloned then you can write the following query

issueFunction in linkedIssuesOf("", "clones") (it is your case)

If you want to get all issues that were cloned from other issues you have to write

issueFunction in linkedIssuesOf("", "is cloned by")

Alfred Tan December 5, 2017

Hi Alexey,

We are very close to the outcome.

Below is the filter that I use:

issueFunction in linkedIssuesOf("", "clones") AND issuetype = "ChM Task" AND project = I_xx_xxx_xxxx

With the above filter, I do see some duplicate tickets. IS there a filter to get only IBBI-2842?

There are also some standalone tickets, (No link) and some tickets that linked to IMS Application.

Capture2.JPG

Alexey Matveev
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.
December 5, 2017

try like this

issueFunction in linkedIssuesOf("", "clones") AND issuetype = "ChM Task" AND project = I_xx_xxx_xxxx and issueFunction not in hasLinks("is cloned by")

Suggest an answer

Log in or Sign up to answer