Automation for Jira - How to set a user field to the user who triggered the rule
Platform notice: Server and Data Center only. This article only applies to Atlassian products on the Server and Data Center platforms.
Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.
*Except Fisheye and Crucible
Summary
This article explains how to create a rule that will set a user picker field to the user that triggered the automation.
Example of use case: when a ticket is cloned in Jira, all the system fields (including the reporter field) are set to the same values as they were in the original ticket. In some cases, we might want to automatically set the reporter field of the cloned issue to the actual user who cloned the ticket. This article shows an example of automation rule that will help with this use case.
Environment
- Jira Server / Data Center 8.0.0 and any higher version
- Automation for Jira 7.0.0 and any higher version
Solution
To set a user picker field to the user who triggered/initiated the automation, you can use the following smart value:
{{initiator}}
Taking the use case above as an example, the automation rule will look like this:
- WHEN:
- "Issue Created"
- IF:
- "Issue fields condition"
- "Summary" - "Contains" - "CLONE"
- THEN:
- Edit issue:
- Reporter field
Set to:
{{initiator}}
- Edit issue:
The screenshot below shows an example of automation rule that illustrates the configuration above: