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

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

1 vote
Nic Brough -Adaptavist-
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 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.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events