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

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

show error based on validation condition

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

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
Community showcase
Published in Jira Service Desk

The Complete Guide to Atlassian for ITSM

Hi Atlassian Community! This is Teresa from the Atlassian team. My colleague Paul Buffington @Buff and I are excited to share a brand new ITSM resource we’ve created – "The Complete Guide to At...

2,211 views 14 22
Read article

Community Events

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

Find an event

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

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you