Hi,
I wanted to make the assignee mandatory for one of the project-issuetype. I have thought on the below.
if ( issue.assignee.name == null )
{
return false
}
Tried the below as well.
if (issue.getAssignee() == null)
{
return false
}
I got to understand that many thing come sinto the effect once the issue is created however validators are to check before the issue is created.
Could anyone suggest a method using which I can access the create form elements and validate it.
Hi @Mohit Dhir ,
Your method is correct, please try this script :
import com.opensymphony.workflow.InvalidInputException
if (!issue.getAssignee()){
invalidInputException = new InvalidInputException("Assignee cannot be empty.")
throw invalidInputException
}
Antoine
Thanks for your help. Now I understand that it needs to be an exception to terminate.
it worked thanks.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Tried the below as well. Same no effect
if (issue.getAssignee() == null)
{
return false
}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.