Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,323,836
Community Members
 
Community Events
168
Community Groups

Extract previous (latest) assignee from a ticket using smart value

Hi, I am figuring out how to retrieve the previous assignee from a ticket request.

 

The reason why I am doing this is to remove the assignee from the watcher list once that particular person is being moved out of the assignee. I am thinking of smart value implementing on an automation.

 

This is the automation that I have in mind but it does not work due to the invalid smart value.

remove watcher automation.PNG

 

3 answers

1 accepted

5 votes
Answer accepted

Hi @Vandyck Lai Kai Yong 

Have you tried using the change log to access this value?  For example, this would return the ID of the previous assignee, assuming you have the same trigger of field change on assignee:

{{changelog.assignee.from}}

Best regards,

Bill

Hey @Bill Sheboy 

 

This works perfectly, thank you so much.

Like Bill Sheboy likes this

Slightly different answer to a similar question.

We wanted to get the previous assignee before automation changed it (as part of a workflow transition post action) to assignee "Automation by Jira" so we could set it back to the original. Here's the important details:

Create Variable {{oldAssigneeId}} with the smart value {{assignee.accountId}}
Edit Field (Assignee): {{oldAssigneeId}}

TL;DR To store and use assignee, you need to be using the unique Account ID of that user, and that is stored in the {{assignee.accountId}} smart value. Reference: https://support.atlassian.com/cloud-automation/docs/jira-smart-values-users/

Hi @Vandyck Lai Kai Yong 

In another community item ( https://community.atlassian.com/t5/Marketplace-Apps-Integrations/How-can-assign-previous-user-on-a-defined-issue-status/qaq-p/650912

I see Andreas mentioning the following smart value. 

 

{{issue.Previous Assignee}}

 

Does this work for you?

Regards. Marco

Hi @Marco Brundel 

 

It does not work but I came up with an idea is there any way for me to extract the assignee value from audit log in another automation and remove the watcher by running the "Remove assignee from watcher" automation?

 

Something like this, I want to retrieve the assignee value from this audit log to be used in the remove watcher block.

 

set previous assignee.PNG

 

Cheers,

Lai Kai Yong

Suggest an answer

Log in or Sign up to answer