The Atlassian Community Forums are currently in read-only mode. We will be relaunching on a new platform on September 22 (read more here). We apologize for the extended downtime. For concerns or questions, please email communitymanagers@atlassian.com. See you on the other side, on the new Atlassian Community Forums! :)

×

Forums

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

Prevent Duplicate Issues Creation

srilatha konda
November 2, 2020

How to prevent duplicate main issues based on Summary in Jira in Issue Created through Script Validator

1 answer

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

1 vote
Nic Brough -Adaptavist-
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 Champions.
November 2, 2020

The pseudo-code for this validator is:

  • Look at the summary for the current issue
  • Run a search for that string in the summary
  • For each returned issue, read its summary and look at how close a match it is to the new one
  • Return false (and a friendly error message) if one or more results are too close to it

There's some example code for validators over at https://library.adaptavist.com/search?term=validator which can help you with the basics of a validator, and https://library.adaptavist.com/entity/perform-a-jql-search-in-scriptrunner-for-jira is good for running a search.

Frank Zhang
January 12, 2022

This makes sense. However, how would we avoid performance issue? Because originally, it is just a create operation, now it is search and create. If there is a script that creates tickets in my Jira very frequently, the performance will be horrible.

TAGS
AUG Leaders

Atlassian Community Events