Simple Scripted Validator - Assignee is unassigned at time of transition Edited

I would like to create a Transition Validator using the Simple Scripted Validator to check the Assignee field is blank or unassigned at the time of transition. It seems logical to me I could take the example provided "Assignee changed (Workflow functions only)"

issue.assignee != originalIssue.assignee

And change it to:

issue.assignee == NULL

But I get an error about NULL being an undeclared variable. 

Is there a simple 1 or 2 line way to do this?

I have other fields I would also like to verify the values of or verify they have or don't have a value when transitioning an issue. Would it be different for other types of fields?

2 answers

1 vote
Jenna Davis Community Champion Jan 08, 2018

Hello, 

You should be able to do something like this in a simple scripted validator:

if(!issue.assignee){ return false }

Let me know if that works for you!

Jenna

0 vote

Have you tried issue.assignee == null ?

That worked!

Now I feel stupid.

Thanks for your help.

Happens with the best of the best :) Good luck. 

Hi,

Can you please help me create a groovy script:

If Assignee field was changed from "Unassigned"

then

move an issue to "status name"

 

I'm trying to use "Fast-track transition an issue"

Events: Issue Assigned

Condition: I'm not sure 

Action: "status name"

 

issue.assignee == null is not working for me

issue.assignee != originalIssue.assignee - is working for me however it's working also if I change assignee from "someone" to "Unassigned" 

 

Thank you

Suggest an answer

Log in or Sign up to answer
Atlassian Community Anniversary

Happy Anniversary, Atlassian Community!

This community is celebrating its one-year anniversary and Atlassian co-founder Mike Cannon-Brookes has all the feels.

Read more
Community showcase
Julia Dillon
Posted Apr 17, 2018 in Jira

Tell us how your team runs on Jira!

Hey Atlassian Community! Today we are launching a bunch of customer stories about the amazing work teams, like Dropbox and Twilio, are doing with Jira. You can check out the stories here. The thi...

767 views 2 19
Join discussion

Atlassian User Groups

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

Find a group

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

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you