Condition/Validator for creating unique issue

I'm having hard time with condition/validator.   
I have a project for HR purposes. Issues in that project = profiles of candidates. Issues summary=Name of candidate.
I need a condition/validator which would check the summary of existing issues in the project and wouldn't allow to create a new issue if there's an existing issue with the same summary=name 

1 answer

0 vote
Tarun Sapra Community Champion Oct 02, 2017

Generally, validator/condition are associated with issue workflows. But in your case you want validation based on already existing issues i.e. you don't want the issue to be created if an issue with a similar summary already existing. 

Thus, in the validation section of the issue. You will need to write a validator which uses issueSearchService and fires an JQL query to check if an similar issue already exists and if it doesn't exist then let the current issue be created otherwise return false and show the message that an issue with similar summary already exists. 

Tarun Sapra Community Champion Oct 02, 2017

Here's the sample code - https://scriptrunner.adaptavist.com/4.3.6/jira/recipes/misc/running-a-jql-query.html 

The searchresults should be nil for validator to be true.

Suggest an answer

Log in or Sign up to answer
How to earn badges on the Atlassian Community

How to earn badges on the Atlassian Community

Badges are a great way to show off community activity, whether you’re a newbie or a Champion.

Learn more
Community showcase
Published Thursday in Jira

5 ways you can make the most of Jira Software and Bitbucket Cloud

As part of the Bitbucket product team I'm always interested in better understanding what kind of impact the use of our tools have on the way you work. In a recent study we conducted of software devel...

89 views 0 5
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you