How can I create a custom automation which adds the name of the previous assignee on a ticket under the label section during a transition which changes the assignee? Doing this so its easier to see who has worked on what ticket during a sprint since our workflow has a lot of different people involved during different stages.
For example lets take the transition from to-do to In-progress. Lets assume its assigned to person A in the to-do status. When A transitions the ticket to In-progress status, it will be assigned to person B and a label should be created with the name of person A. Any suggestions are appreciated!
Labels don't take spaces. With that caveat one possible way is below
1. Have below Trigger
2. While using Edit Issue field, add below is the advanced section
{
"fields": {
"labels": [ "{{fieldChange.fromString.replace(" ", "") }}" ]
}
}
Let me know if this works for you
@Kaladin Stormblessed You can achieve this use case efficiently by using a multi-user picker field instead of labels. A multi-user picker field is better suited for tracking who has worked on a ticket, as it directly associates users with the issue without the risk of mislabeling or formatting inconsistencies.
You can create a custom field with a name like:
Here’s how you can set up an automation rule to track and update this field every time the issue assignee changes:
Trigger:
Condition (Optional):
Action - Edit Issue:
Here’s an example JSON for the Edit Issue action (Advanced Edit):
{
"update": {
"customfield_xxxxx": [
{
"add": {
"accountId": "{{issue.assignee.accountId}}"
}
}
]
}
}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks, I have done as you suggested. But the automation never updates the multi-user picker field on the ticket. When I run the automation this is the error visible in the audit log.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Akash Singh I fixed it, I had to remove the field input, and under the advanced section, instead of add, its set. "Add" isnt supported. Check below
{
"update": {
"customfield_xxxxx": [
{
"set": {
"accountId": "{{issue.assignee.accountId}}"
}
}
]
}
}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.