Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Attempting to set the Reporter based upon taking the name from the Description field

Mark Dodd
August 25, 2026

I have been successful in pulling the name from description information where the name is in a table field

 

Example information

Screenshot 2026-08-25 at 10.55.19 AM.png

 

I have an automation set to set the Reporter field to the following 

 

{{issue.description.match("Requestor:\\s*([^|\\n\\r]+)\\s*(?=\\||\\n|\\r|$)").trim}}

 

I have confirmed via logging that it is pulling the name without spaces correctly using the above code and in the above description example it gives "Mark Dodd" without the quotes.

 

But it is just setting the reporter to Anonymous and I can't figure out why.

3 answers

2 accepted

2 votes
Answer accepted
Brandon Viertel
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Champions.
August 25, 2026

Morning @Mark Dodd ,

Welcome to the community!

When setting the reporter field (or any other user object field), I believe it only accepts Atlassian account IDs. When invalid data is used, it defaults to Anonymous. 

Thanks!

Brandon 

Mark Dodd
August 25, 2026

is there anyway to look up a users ID based upon the name.

 

I just assumed it would take the name as when you paste in a name to the field it finds the person.

0 votes
Answer accepted
Andrey - Guenov Labs
Atlassian Partner
August 26, 2026

Hi Mark, Brandon's right about the root cause — Reporter (and any user-picker field) only accepts an Atlassian accountId, not a display name. Feed it something else and Jira silently falls back to Anonymous instead of erroring, which is why your rule "runs" but the field's wrong.

To answer your follow-up — yes, you can resolve a name to an accountId inside the same rule:

  1. Add a Send web request action before your "Edit issue fields" step: GET https://<your-site>.atlassian.net/rest/api/3/user/search?query={{issue.description.match("Requestor:\\s*([^|\\n\\r]+)\\s*(?=\\||\\n|\\r|$)").trim.urlEncode}}
  2. That endpoint fuzzy-matches display name and email, returning an array of matches, each with its own accountId.
  3. In Edit issue fields, set Reporter to {{webhookResponse.body.first.accountId}}.

One caveat before you ship it: .first on a fuzzy match can silently grab the wrong person if two people share a similar name. If the description ever has an email instead of just a name, match on email — far less likely to collide. If you're stuck with just a name, add a guard (webhookResponse.body.size == 1) so an ambiguous match fails loudly instead of quietly misassigning the reporter. Atlassian's own doc on this exact pattern confirms there's no built-in name→accountId smart value — the REST lookup is the way: support.atlassian.com/cloud-automation/docs/convert-usernames-to-account-ids/

Mark Dodd
August 27, 2026

 

after a bit of trial and error (had to work out authentication) I have this working now using the rest api.

Thanks for both of you for the assistance

2 votes
Varun Chillamcharla
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Champions.
August 25, 2026


Hi Mark,

 
Yes, there's a native way to do this in Automation, use the "Lookup users" action.
 
1. Add a "Lookup users" action before your "Edit issue field" step
2. Set the search criteria to Display name (or email if you have that instead), and feed it the name you extracted, e.g., {{issue.description.match("Requestor:\\s*([^|\\n\\r]+)\\s*(?=\\||\\n|\\r|$)").trim}}
3. This returns a list of matching users into a variable, typically referenced as {{lookupUsers}}
4. Then in your "Edit issue field" step for Reporter, use {{lookupUsers.first.accountId}} instead of the raw name
 
One thing to watch for, this only works reliably if the name in your Description exactly matches a user's actual Display Name in Jira, nicknames, typos, or "Last, First" vs "First Last" formatting will cause no match. Worth adding a check for when lookupUsers comes back empty, so you're not silently defaulting to Anonymous again in those cases.
janez_m
Contributor
August 27, 2026

That action sounds great, but our Jira Cloud Premium does not have it - under Jira section in automation I have just: Lookup work items

Any idea why I cannot see this action?

Varun Chillamcharla
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Champions.
August 27, 2026
Hi janez_m,
good catch, and honestly, on reflection I'm not fully certain "Lookup users" exists as its own distinct action, what I can confirm is "Lookup issues" (recently renamed to "Lookup work items", which matches what you're seeing) and "Lookup objects" (JSM/Assets-only). I may have gotten the exact action name wrong.
 
For actually resolving a user by name in Automation without a confirmed native lookup, the reliable fallback is Send Web Request calling Jira's REST API user search endpoint (/rest/api/3/user/search?query=), then parsing the accountId from the JSON response with a Create Variable step. That works regardless of plan or product since it's hitting the API directly.
 
Sorry for the confusion, worth double-checking Atlassian's current automation actions list directly since naming and availability shifts over time: https://support.atlassian.com/cloud-automation/docs/jira-automation-actions/
Mark Dodd
August 27, 2026

the step to use is Send web request , See Andrey - Guenov Labs's answer that should be on this post

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
PREMIUM
TAGS
AUG Leaders

Atlassian Community Events