Changing the assignee via the Behaviours plugin

Hi,

We are using the Behaviours plugin to set the Assignee to the user listed in a custom field called "Verifier" when an issue is resolved. We want to be able to, ahead of time, decide who will test an issue and assign them to be the tester via the Verifier field. When a Developer resolves an issue, we then want the Assignee to be set to the Verifier.

We're using the following code for the Resolve action:

// Set assignee to verifier custom field when resolving an issue

FormField Assignee = getFieldById("assignee")

FormField Verifier = getFieldById("customfield_10304")

String form_value = (String) Verifier.getFormValue()

Assignee.setFormValue(form_value)

The code seems to work well, but only sometimes. It seems that it only works if the Verifier has been assigned to an issue one or more times. If the Verifier has never been assigned to any issue, the Assignee is set to Unassigned when any issue with that Verifier is resolved. But, for any of those same issues, if I click the Assign button, assign it to the Verifier, then assign it back to the Developer, the above code works when the issue is resolved - i.e., the Assignee is set to the Verifier. And the code continues to work when assigning the same user to verify other issues.

Seems really strange. Does anyone know why we would be seeing this behavior? Are others using the Behaviors plugin to the set the Assignee field?

Thanks in advance.

2 answers

This widget could not be displayed.

Probably you just need to use the post function provided by this plugin.

This widget could not be displayed.

I know you posted this a year ago but I am having a similar problem and was wondering if you ever got your issue resovled and if you did so without using a Post Function.

Thanks,

Jon

Suggest an answer

Log in or Sign up to answer
Community showcase
Posted Tuesday in Jira

What modern development practices are at the heart of how your team delivers software?

Hey Community mates! Claire here from the Software Product Marketing team. We all know software development changes rapidly, and it's often tough to keep up. But from our research, we've found the h...

169 views 1 3
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