Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Automatically cancel duplicate request

Phu Huynh _Admin_ November 15, 2024

Hi community and friends,

I have a question about "Automatically cancel duplicate request".

My context:

1, There was a ticket raised for an issue.

2, Few days later, a new ticket is also raised with the same format.

My question, How can I automatically cancel the request which is raised at the second time. I'm not sure if the Automation rule can handle my idea or not.

Please advise me some solutions to solve it.

Thank you!

2 answers

1 accepted

1 vote
Answer accepted
Jehan Bhathena
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
November 17, 2024

Hi @Phu Huynh _Admin_ ,

You can try to create an automation with the below logic:

image.png

Logic behind this, when an issue is created we use the Lookup action to search for all issues with that exact summary, if we find more than 1 that means there are 2 issues with the same summary, which can be marked as Duplicate then.

image.png

You can tweak the lookup action's filter to suit your JQL better.

Phu Huynh _Admin_ November 21, 2024

Hi @Jehan Bhathena

I appreciate your detail information, I found out the solution to solve my issue. And luckily, it looks same as yours.

I would like to show it here to help other people if they have the same issue as me.

 

1, I create 2 temporary Variables

1.png

 

2, Compare the field "Email Address" of the trigger ticket

2.png

 

3, The rest components are just to link issues, and comment.

 

The whole automation rule as below

3.png4.png5.png

2 votes
Bill Sheboy
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 16, 2024

Hi @Phu Huynh _Admin_ 

How are you determining that a request was a duplicate?

If that can be determined by examining the fields, a Jira Automation rule could transition the issue to "canceled": https://www.atlassian.com/software/jira/guides/automation/overview#what-is-automation

Kind regards,
Bill

Phu Huynh _Admin_ November 16, 2024

Hello Bill, I'm glad to get your support. The duplicate ticket is the same as the main one. I'm going to compare the summary of those tickets, or a specific custom field in the ticket (I have a field called "Email") and I will use that fields to compare 2 tickets together.

Thank you for your suggestion, will revert to you once it works for me.

Phu Huynh _Admin_ November 16, 2024

Hi Bill and community,
I will give you an example here. There are 5 created tickets with the Summary below:

TKT-1 _ Onboard | Huynh Thien Phu

TKT-2 _ Onboard | Rosie Thai

TKT-3 _ Onboard | Nguyen An Binh

TKT-4 _ Onboard | Giap Ngoc Hai

TKT-5 _ Onboard | Vu Dai Nghia

Today, there is a new ticket raised the same ticket TKT-5. It's TKT-6 _ Onboard | Rosie Thai
I would like to automatically cancel the ticket number 6. Because it's duplicated with the TKT-5.
I've tried to compare the summary, however, I cannot use smart value to compare the summary of the TKT-6 to the rest. Do you have any idea?

Thank you!

Bill Sheboy
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 17, 2024

You could create a rule which compares the Summary to other issues, using the JQL CONTAINS ~ operator with the "exact phrase" matching syntax: https://support.atlassian.com/jira-software-cloud/docs/jql-operators/#CONTAINS----

Like Jehan Bhathena likes this
Phu Huynh _Admin_ November 21, 2024

Hi @Bill Sheboy 

Thank you for your diligent. Your reference gives me more insight to improve my knowledge about Jira Automation rules and help me to solve my issue. I would like to update my solution as below, to help someone else who has the same problem.

1, I create 2 temporary Variables

1.png

 

2, Compare the field "Email Address" of the trigger ticket

2.png

 

3, The rest components are just to link issues, and comment.

 

The whole automation rule as below

3.png4.png5.png

Bill Sheboy
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 22, 2024

That will not work as you expect...

Branches which could be on more than one thing (such as a Branch on JQL) run in parallel and asynchronously.  There is no defined processing order for the items in the branch and there is no guarantee when the branch will finish, up until the last step of the rule: https://support.atlassian.com/cloud-automation/docs/jira-automation-branches/#Ordering-of-branch-executions

For the rule you show, this will cause:

  • the variable created before the branch, and re-created inside likely will not contain a predicable value
  • the steps you show after the branch could execute before the branch completes running

Instead you could use the Lookup Issues action with JQL to get the other issue(s).

 

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events