Forums

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

How to add error message for any field is mandatory using ScriptRunner(Groovy Script).

Pankaj Mehta
Contributor
July 10, 2023

Hi Team,

 

I want to add error message suppose for resolution field that make mandatory.

If we keep blank and we proceed next it should show error message "Resolution is required".

so, that error message we want to add using only ScriptRunner by writing the code.

Thanks.

1 answer

0 votes
Sayed Bares _ServiceRocket_
Community Champion
July 10, 2023

@Pankaj you would need to use 

throw new InvalidInputException("Error message")

Here is a documentation which you can refer to:

I hope it helps!

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 Leaders.
July 10, 2023

You don't really need this for resolution - you can't leave it blank.

Suggest an answer

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

Atlassian Community Events