Jira script runner check a custom field then edit another?

Hi,

I'm currently trying to make a script to no avail.

I have two custom fields one called "Resolution level" and the other "Resolved by".
I need a way for when a ticket transitions from "open" to "resolved", it checks the resolution level and if its "None" it sets the "Resolved by" field to be empty.

1 answer

0 votes

This needs a little clarification:

When you say "from "open" to "resolved"" - I assume you want a post-function script? (it's the most simple approach for this, as it'll just need an "if/then set field" block of code)

Is the resolution level a select list?  If so, is this "none" JIRA's display for "empty", or is it an option in your list?

Is "Resolved by" a user-picker field or text? 

Hi Nic,

Resolution level is a select list, it goes from "None" then "1" "2" "3".

Resolved by is a custom field User Picker (single user).

Sorry, I was not clear on how to answer the first one - is "none" an option you've added or is it the system "none"?  If you go to edit the list of options, do you only see 1, 2 and 3 as options?

Hi Nic,

I see "None" as an option, I believe it is an option we added.

Suggest an answer

Log in or Sign up to answer
Community showcase
Published yesterday in Agile

Try the new Jira Cloud add-on for Google Sheets

Hi Atlassian community, I work on the product integration team at Atlassian and I am very excited to announce the early access program for the Jira Cloud add-on for Google Sheets. This add-on giv...

155 views 1 7
Read article

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