Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

How to automatically change the assignee when transitioning the workflow

I need to change the assignee when transitioning through the workflow.  But if the review of the doc in each part of the workflow was to fail, I need to assign it back to the person who last reviewed/changed it.  I know using a post-function I can change the assignee as it moves forward but if it moves backward then how do I assign the issue back to the last person who had it.  I do not want to assign to the Reporter who was the person who originally created it. 

1 answer

1 accepted

0 votes
Answer accepted

You could do this by:

  1. Create a new custom field for 'Previous Assignee'.  It doesn't have to be added to the screens if you don't want it seen.
  2. On transition, copy the Assignee to the Previous Assignee field, and assign to the new individual.
  3. On transition back, copy Previous Assignee back to Assignee.

That sounds good but looks like you would have to use something like Script Runner to make it happen.

You can do it with the Jira Misc Workflow Extensions addon

You don't even need a new custom field for this (Yay! Clean instance!). With a groovy script in ScriptRunner / Jira Misc Workflow Extensions or the expression parser (a function called previousValue() or fieldHistory()) in Jira Workflow Toolbox you can access historic values of a field. I would prefer that as long as you can make sure assigning issues only happens for a reason and a controlled manner. Then it's pretty easy. :)

Best, Max

You can also use JMCF's "Transition Author" custom field type to automatically capture the last author of a transition (such as "Review"), and then copy from that field to the Assignee field when you want to reassign to the last reviewer. The advantage is that this field will work on existing issues, unlike if you create a normal field and fill it during the transition.

Edit: Forget what I wrote. That went horribly wrong. :D

Decided to go with using Jira Misc Workflow Extensions, have it working now.  Thanks for all the good ideas.  I also added script runner encase I need it later.

Suggest an answer

Log in or Sign up to answer
Community showcase
Published in Jira Software

How to create Jira issus from Excel file?

When to use CSV importer When managing your processes in Jira, there are many occasions where you need to create a lot of tasks. Creating them one by one will cost you a lot of time and effort and i...

4,349 views 22 31
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you