Forums

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

Custom Field value validation to prevent duplication

WAJDI ALZINATI June 6, 2021

HI, 

I'm trying to use ScriptRunner to make a validation for custom Field value during issue submit so it will check if the field value isn't duplicated in any another issue.

is there any one can help me with required java script 

Thanks 

1 answer

0 votes
Ravi Sagar _Sparxsys_
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.
June 6, 2021

Hi @WAJDI ALZINATI 

You need to create a script validator and need to use Groovy not JS. 

I would recommend take a look at some sample scripts here to get an idea about how to get started with script validators.

Ravi

WAJDI ALZINATI June 7, 2021

Hi Ravi, 

 

can you help me with required groovey script, i tried to use below one but its not working

 

count(filterByValue(fieldValue(%{field_name}, filterByIssueType(getIssuesFromProjects("ProjectName"), "IssueName" ) ) , =, %{field_name})) = 0

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
SERVER
TAGS
AUG Leaders

Atlassian Community Events