Issue last Updated By User
Asked by Kurtis:

I'm trying to create an automation that will populate a custom user field with the user who last updated the ticket. This seems like it should be possible, but the field isn't being populated despite the automation running. It just stays as "none".

I've tried the following:

* Rule is triggered on All Comments \> Edit issue field "Last Updated By", Copy from trigger issue.
* Rule is triggered on All Comments \> Edit issue field "Last Updated By", Advanced fields { "fields": {"customfield_10152": "{{{{comment.author.accountId}}}}"}}.
* Rule is triggered on All Comments \> Edit issue field "Last Updated By", Advanced fields { "fields": {"customfield_10152": "{{{{comment.author.EmailAddress}}}}"}}.
* Rule is triggered on All Comments \> Create Variable {{CommentAuthorID}} from {{comment.author.accountId}} \> Edit issue field "Last Updated By", Advanced fields { "fields": {"customfield_10152": "{{CommentAuthorID}}"}}.

Any assistance would be appreciated.


Answers:
author: Kurtis
body: I got this working by using the following format in the "Edit fields" action.

```
{
"fields": {
"customfield_10152": {"id": "{{initiator.accountID}}" }
}
}
```


author: Trudy Claspill
body: Hello [@Kurtis](/t5/user/viewprofilepage/user-id/5362411)

When you want to edit a field through Automation you have two options:

Select the field from the list (1), so that it shows up below (2), and enter the value/smart value for that field at (3).

![Screenshot 2024-05-21 at 2.31.11?PM.png](https://community.atlassian.com/t5/image/serverpage/image-id/325160iA8EE5B8CF109DA2C/image-dimensions/308x261?v=v2 "Screenshot 2024-05-21 at 2.31.11?PM.png")

- OR -

Make sure the field does not show up at (2), click on More Options (3), and add your JSON in the available field (4).

![Screenshot 2024-05-21 at 2.34.08?PM.png](https://community.atlassian.com/t5/image/serverpage/image-id/325161i8B41B6534C08B52B/image-dimensions/320x396?v=v2 "Screenshot 2024-05-21 at 2.34.08?PM.png")

It sounds like you may have both JSON in (4) and have selected the field at (2), which won't work.

What is the field type for the field you are trying to set? Is it a user picker field?

Your question is in the Jira Service Management forum. Does this concern a Service Management project? If so, comments might be added by Agents or by Customers. Do you want the field set regardless of whether the comment author is an Agent or a Customer?

comments: author: Kurtis
body: Thank you for the thorough response. I'm on my phone so I'll be short.

Yes i need to check the automation settings. I think I have both set from troubleshooting.

It's a user picker field in JSM that I want to show who last updated the ticket. This can be a tech or a customer.


author: Hannes Obweger - JXL for Jira
body: Hi [@Kurtis](/t5/user/viewprofilepage/user-id/5362411)

I understand that you are currently approaching this via Jira Automation. Just as food for thought: If you are open to solutions from the Atlassian Marketplace and don't want this to eat into your Automation budget, the field would also be available out-of-the-box in the app that my team and I are working on, [JXL for Jira](https://marketplace.atlassian.com/apps/1224710?hosting=cloud&tab=overview&utm_source=atlassian-community&utm_medium=referral&utm_content=2704420).

JXL is a full-fledged spreadsheet/table view for your issues that allows viewing, inline-editing, sorting, and filtering by all your issue fields, much like you'd do in e.g. Excel or Google Sheets. It also comes with a long list of so-called *smart columns* that aren't natively available, including *last updated by user*.

This is how it looks in action:

![last-updated-by-user.gif](https://community.atlassian.com/t5/image/serverpage/image-id/325270i9F7CFD6C24CBF129/image-size/large?v=v2&px=999 "last-updated-by-user.gif")

As you can see above, you can easily sort and filter by your smart columns, and also use them across JXL's advanced features, such as support for (configurable) *issue hierarchies* , *issue grouping* by any issue field(s), *sum-ups* , or *conditional formatting*.

This all *just works* - there's no automation or scripting whatsoever required.

Any questions just let me know,

Best,

Hannes

comments: author: Kurtis
body: Thank you for the reply. I will consider this if the automation doesnt work.


Tags: cloud

jira-service-management

jira-service-management-cloud