Forums

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

Is it possible to auto assign issue based on custom field used in workflow postfuction in jira cloud

Chethan GR
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.
December 5, 2018

Hi i need a little help here, we are using jira cloud and i need a script to auto assign issue based on the user selected in the custom field in workflow postfunction for script runner add-on.

1 answer

0 votes
Kristian Walker _Adaptavist_
Community Champion
December 19, 2018

Hi Chethan,

I have created an example script located here which can be placed on a post function in a workflow and  shows how you can extract the value of a user picker field and set the assignee as the extracted user. Using this script you just need to set the UserPickerFieldName variable to the name of your user picker field.

Please note this script says it is for the create transition but will work on a normal transition if you place it as the first post function on all transitions except for the create transition.

You will be able to modify this script to achieve your requirements if you are using a different field type for the Approvers field by refering to the examples for extracting custom field values in the documentation pages located here.

If this response has answered your question can you please mark it as accepted so that other users can see it is correct when searching for similar answers.

Regards,

Kristian

Suggest an answer

Log in or Sign up to answer