Set a custom field value during specific workflow transition

Garry Harman January 6, 2020

Is it possible to update a custom field to a pre-determined value only when an issue makes a specific transition?

For example, we would like to update a custom field to a particular value only when it transitions from the "Open" status to the "Closed" status directly.

2 answers

0 votes
Thorsten Letschert _Decadis AG_
Marketplace Partner
Marketplace Partners provide apps and integrations available on the Atlassian Marketplace that extend the power of Atlassian products.
January 7, 2020

Hi @Garry Harman ,

as mentioned before you won't be able to update a custom field without an additional workflow app. e.g. Jira Workflow Toolbox, Jira Misc Workflow Extensions, Jira Suite Utilities or the aforementioned Script Runner if you're familiar with groovy.

Cheers
Thorsten

0 votes
Ravi Sagar _Sparxsys_
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.
January 6, 2020

Hi @Garry Harman 

It is certainly possibly using a post function in your workflow's transition.

There is a post function called "Update Issue Field" but it is not for custom fields. So I would recommend you to take a look at ScriptRunner which can do exactly what you are looking for. This page has some examples as well.

I hope it helps.

Ravi

Garry Harman January 7, 2020

I'm surprised this isn't something that can be done using the Post Function in the workflow.

I'm super inexperienced with coding, I know how to understand/change values from existing code, but I cannot write something on my own. Should I forget trying to implement this?

Like # people like this

Suggest an answer

Log in or Sign up to answer