Finding Failures that have been cloned, and the clone is closed or verified

Olof Chama Lindqvist November 14, 2024

Hello,

I'm trying to filter out all Failures that has been handled.

So I want to find Failures that has a clone (has an Issue Links "is copied to"), where that clone has status in Closed or Verified.

I figured out how to get above for Failures that hasLinkType(Copy), but that gives me both "is copied to" and "is copied from", and I do not want that.

I wrote:

project = MyProject AND issuetype = Failure AND issueFunction in linkedIssuesOf("project in (MyProject) and issueFunction in hasLinkType(Copy) and status in (verified, closed) and resolution != rejected")

Does anyone know how to do this?

 

/Olof

1 answer

0 votes
Marc - Devoteam
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 14, 2024

HI @Olof Chama Lindqvist 

Welcome to the community.

The JQL not correct, linkedIssuesOf syntax is (subquery, linktype)

I think the JQL should be:

project = MyProject AND issuetype = Failure AND issueFunction in linkedIssuesOf("project = MyProject and status in (verified, closed) and resolution != rejected", "Copy")

See documentation, issue-links - linkedissuesof 

Olof Chama Lindqvist November 14, 2024

Thank you for your answer.

I've been trying a lot here, but there is something wrong. 

Example 1: 

project = MyProject AND issueFunction in linkedIssueOf("type=failure", "is copied to")

Here I get about 50 hits (among about 2000), and some of the hits have Issue Links "is copied from", some have "is copied to" and some have both.

Example 2:

project = MyProject AND issueFunction in linkedIssueOf("type=failure", "is copied from")

Here I get almost 500 hits (among about 2000), and all from Example 1 seem to be included. 

BTW: if I write ...linkedIssuesOf("<code>", "Copy") I get an error

Marc - Devoteam
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 14, 2024

HI @Olof Chama Lindqvist 

Copy should be replaced by the required link name.

I took this from your original JQL.

I don't have a DC instance running.

JQL 1 will return all issue of type failure with link type "is copied to"

JQL 2 will return all issue of type failure with link type "is copied from" from MyProject

Are the cloned issues of the same type?

I think the JQL should be like this:

type = failure and issueFunction in linkedIssueOf("type=failure", "is copied from", "is copied to")

Olof Chama Lindqvist November 14, 2024

This is weird. In the link you sent for documentation it states:

 image.png

So I wrote: (and got the listed error)

image.png

Olof Chama Lindqvist November 22, 2024

After a lot of trying I finally got a prompt that works. I got if from asking ChatGPT.

project = <MyProject> AND type = failure AND issueFunction in linkedIssuesOf("status in (Closed, Verified) AND resolution != Rejected", "is copied from")

 

Like Marc - Devoteam likes this

Suggest an answer

Log in or Sign up to answer