Changing the assignee via the Behaviours plugin

tstahr July 20, 2012

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

0 votes
Jon Starbird
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
May 21, 2013

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

0 votes
Renjith Pillai
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
July 20, 2012

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

Suggest an answer

Log in or Sign up to answer