Display Usernames Correctly Using Jira Data Center Automation

Platform Notice: Data Center Only - This article only applies to Atlassian apps on the Data Center platform.

Note that this KB was created for the Data Center version of the product. Data Center KBs for non-Data-Center-specific features may also work for Server versions of the product, however they have not been tested. 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

When using the post comment action in Jira Automation to @mention users, some (all) users are listed as "JIRAUSERXXXX". This article will explain why and propose a solution.

This article is for Jira Data Center only. For Jira Cloud please refer to our documentation on Smart values in Atlassian Automation

Example

These are the users added to the user picker field:

  • userA, userB, userC, userD, userE, userF, userG, userH

The script in the post comment action in Jira Automation is written in text mode as follows:

Single User:

[~{{issue.customfield_10000}}]

Multi Users (Test 1):

{{#issue.customfield_10000}} [~accountid:{{accountId}}] {{^last}}, {{/}}{{/}}

Multi Users (Test 2):

{{#issue.customfield_10000}} [~{{accountId}}] {{^last}}, {{/}}{{/}}

Multi Users (Test 3):

{{#issue.customfield_10000}} [~accountid:{{issue.customfield_10000.accountId}}] {{^last}}, {{/}}{{/}}

This results in what the mentions look like in the comments:

[~JIRAUSER22006] , [~JIRAUSER32410] , [~JIRAUSER30323] , [~JIRAUSER24701] , userE , userF , [~JIRAUSER30236] , userH

Some users resolve successfully, but some are just listed as "JIRAUSERXXXX".

Environment

Jira Data Center versions 8.4.0 and later

Solution

Prior to version 8.4.0, user_keys were equal to the user's first username, which made them almost always equal to the current username. However, starting on Jira 8.4.0, to comply with GDPR policies and reduce the number of places where we store users’ personal data, we’ve changed this approach so that all user keys for new users (no changes were applied to existing users) have the new format = "JIRAUSERXXXX".

Refer to our documentation for more information on the username changes:

Use smart value in rule action

Add this smart value format in the "Add a comment to issue" action:

{{#issue.customfield_10000}}[~{{name}}]{{^last}},{{/}}{{/}}

ℹ️ Replace customfield_10000 with the custom field ID from your Jira instance.

Then, trigger the automation to add a comment to the issue. You will see that the newly commented section has displayed the list of users' correct usernames instead of "JIRAUSERXXXX."

Additional information

Smart values in Jira automation

Updated on September 25, 2025

Still need help?

The Atlassian Community is here for you.