Forums

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

Compare two user picker field using JMWE validator

Vikrant Yadav
Community Champion
January 13, 2023

Hi Guys,

Need your help in JMWE plugin. 

I am trying to apply a validator on transition screen which blocks transition when assignee = customfieldvalue(user picker).  if Assignee not equals to user picker custom field value then transition will happen otherwise it gives an error. I have JMWE plugin. I tried to add Field Has Been Modified Validator and it works for me , but it's doesn't have option to add error message. 

Then i tried to add Scripted validator using following script but it's giving error in every scenario. Kindly suggest

if(issue.get("assignee") == issue.get("customfield_14840")){
"You cannot move forward since the Assignee and QA Contact are same"
}

 

1 answer

1 accepted

2 votes
Answer accepted
David Fischer
Community Champion
January 13, 2023

Hi @Vikrant Yadav ,

you need to use a Scripted (Groovy) Validator with this script:

issue.get("assignee") != issue.get("customfield_14840")

and input your error message in the Error message field. 

Vikrant Yadav
Community Champion
January 13, 2023

Thanks @David Fischer 😊 

I was waiting for your response😋

Suggest an answer

Log in or Sign up to answer