"Assignee" default value in Workflow screen

Themis Solutions June 21, 2012

Hi,

The default configuration for JIRA is such that whenever the workflow screen is presented, the Assignee field defaults to the current Assignee. We would like to modify that behaviour, such that the default Assignee is Automatic, _not_ the current Assignee.

I've looked through the configuration and can't find a way to do this, is such a configuration possible?

Thanks.

3 answers

0 votes
Pavel Perna April 2, 2019

Hi, after few hours of reading atlassian forum and performing my own tests with scripts i found a solution to change the default assignee value on transition screen to "Automatic"

 

* go to JIRA Administration ~ Add-ons

* select Behaviours

* create a new Behavior

* create a new Mapping 

* check the "Use validator plugin" box

* select Workflow to use ( required for next step )

* add Condition : Workflow action and select action from dropdown

* put following code into custom script : 

 

 

def Assignee = getFieldById("assignee");
Assignee.setFormValue("-1");

 

 

Then it will work :)

Pavel Perna April 2, 2019

Notice that it has to be -1 STRING value if you use just Assignee.setFormValue(-1) it will not work. In case you want to set assignee to "Unassigned" use Assignee.setFormValue("") ( EMPTY STRING )

Pavel Perna April 2, 2019

Really suprised that no-one on this forum found a solution , such a simple task , took 4 hours of my life :)

Jakob Bak November 28, 2019

Great work Pavel. Helped me in the right direction. Didn't know of the use of behaviours with Scriptrunner.

Goutam Nemalpuri December 16, 2020

Hi @Pavel Perna ,

Thanks for your suggestion. I have added the behavior as suggested by you. But after setting the form value of assignee field it's not allowing me to click on the transition button. no errors as well. Do you have any solution for this?

image.png

0 votes
Deleted user April 4, 2018

Was there eventually a solution for this?

i'm looking for something similar

0 votes
Norman Abramovitz
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.
June 21, 2012

There are various post-functions on transitions that can be used to set the assignee field. It does not need to be the current user. Please look at this documentation and in particular the optional post functions..

https://confluence.atlassian.com/display/JIRA/Configuring+Workflow#ConfiguringWorkflow-Applyingpostfunctionstotransitions

https://confluence.atlassian.com/display/JIRA/Configuring+Workflow#ConfiguringWorkflow-Usingapostfunctiontosetafield

Angell April 1, 2013

@Norman, you aren't answering Themis' exact question. He wants to modify the DEFAULT assignee value. I'm sure he knows he can use post functions to assign a ticket, but sometimes you want the user to have the choice to override the post function (some post functions have the option to conditionally allow overides, such as"unless user selects an Assignee in the transition screen").

How can you customize the DEFAULT value of assignee away from the current assignee and into "Automatic"?

Suggest an answer

Log in or Sign up to answer