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
@Aditya Pandav 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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.