Use case
Store the last assignee in a status in a hidden User Picker field and update the Assignee field with it in a posterior transition.
This use case requires the implementation of two Update or copy field values post functions in two different transitions.
🗒️ Prerequisites
Set up a custom field
Create a User Picker (single user) custom field and name it Last Assignee In Status
Restrict its context to the desired projects.
Do not add it to any screen! It will be used internally.
⚒️ Configuration
Add the Update or copy field values post function to the transition or transitions that leave the status in question.
Target issue
Choose Current issue
Field
Choose Last Assignee In Status
Value
Choose Set field value manually
Expression
Use the following expression with the expression editor in Advanced text mode.
hasChanged(%{issue.assignee}) = true ? previousValue(%{issue.assignee}) : %{issue.assignee}
Add the Update or copy field values post function to a posterior transition.
Target issue
Choose Current issue
Field
Select Assignee
Value
Choose Copy field value from current issue and select the field Last Assignee In Status
Conditional execution
Restrict the usage of the post function with the following conditional execution. Replace the field code with the appropriate one for the field Last Assignee In Status before using it.
%{issue.cfaaaaa} != ""