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.
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
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.