How can assign previous user on a defined issue status?

I have a workflow based on the following status:

Testing --> Code Review --> Ready For Release

 

The assignation rule is this:

Testing is assigned to A

Code Review is assigned to B

Ready For Released is assigned to A (the user who test the issue)

 

I like to automate the assignation when issues are transitioned to "Ready For Released" based on who was the assignee on "Testing Status"

 

 

2 answers

2 accepted

0 votes
Accepted answer
  1. Install Misc Workflow Extensions app (Sorry, not free)
  2. Create a custom field called "Previous Assignee"
  3. Create a "Update Issue Custom Field" Post Function on the transition that goes between Testing and Code Review that populates the Previous Assignee field with %%CURRENT_USER%%
  4. Create a "Copy Value From Other Field" Post Function on the transition from Code Review to Ready For Release and set the "Source Field" to "Previous Assignee" and the "Destination Field" to "Assignee." Leave "Copy within same issue" selected.
  5. Enjoy the magic of post functions.

Thanks @Dave Theodore [Coyote Creek Consulting] for the workaround.

Creating "Previous Assignee" field might do the trick with Jira Automation. I am reticent to by 2 workflows solutions right now. Nevertheless i will have a look at JMWE.

Thanks!

0 votes
Accepted answer
Andreas Knecht Community Champion Oct 05, 2017

Hi Sebastián,

You should be able to do this simply with Automation for Jira's assign action. There's an option to select the previous assignee:

prvs-assignee.png

Cheers,
  Andreas

This only works when the assignee of the issue is in Code Review never changes.  It doesn't really take in to account things like the intended code reviewer taking a vacation and the issue being reassigned, etc.  Saving the user to a field ensures that the issue gets back to the right place, regardless of what happens to the issue when it is in code review. 

Good point there @Dave Theodore [Coyote Creek Consulting].

Having a "previous assigne" makes a more strong solution if reassignation on the "code review" status occurs.

Thanks @Dave Theodore [Coyote Creek Consulting] and @Andreas Knecht for your responses.

Andreas Knecht Community Champion Oct 05, 2017

True - it depends I guess on the exact requirements and workflow.  Assigning to a member of a custom field is just as easy though with Automation for Jira:

previous-smart-assignee.png

 

Any user picker field would work.

You'd probably need two rules:

  • Rule 1 - Set Previous assignee:
    • Trigger: Issue transitioned
    • JQL condition: status = "Code Review"
    • Action: Edit issue - set 'Previous Assignee' to the issue assignee
  • Rule 2 - Assign to previous assignee
    • Trigger: issue transitioned
    • JQL condition: status = "Ready for Release"
    • Action: Assign issue with {{issue.Previous Assignee}} (shown above)

Cheers,
Andreas

@Andreas Knecht I used the {{issue.Previous Assignee}} but is not working. When the issue is transitioned to "Ready for Release" it is assigned to "Unassigned", not to the previous Assignee.

Looking at the smartfields on confluence config https://codebarrel.atlassian.net/wiki/spaces/AUTO4J/pages/27656216/Smart+Fields i could not find the {{issue.Previous Assignee}} definition.

Any other Smart Fields config documentation i am missing?

Thanks!

 

Suggest an answer

Log in or Sign up to answer
Community showcase
Published Nov 29, 2018 in Marketplace Apps

How to set up an incident workflow from the VP of Engineering at Sentry

Hey Atlassian community, I help lead engineering at Sentry, an open-source error-tracking and monitoring tool that integrates with Jira. We started using Jira Software Cloud internally last year, a...

1,388 views 0 8
Read article

Atlassian User Groups

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

Find a group

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

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you