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

show error based on validation condition

Jyoti Verma June 27, 2019

Here is my code but it is not working.. please help

import com.opensymphony.workflow.InvalidInputException

import com.atlassian.jira.component.ComponentAccessor;

def customField =  ComponentAccessor.getCustomFieldManager().getCustomFieldObject("customfield_10200");

def value = (String)issue.getCustomFieldValue(customField);      

InvalidInputException error= new InvalidInputException()

if((issue.assignee == null) && (value != "DPC-SJ")){

     throw error;

}

error.addError("Assignee is Required!!!")

1 answer

0 votes
PVS
Banned
June 27, 2019

Hi @Jyoti Verma 

 

Firstly What Type Of Coding You Want. Could you Please Tell the  your QUARY 

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events