Forums

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

Change Reporter when issue is created from API

MOOC Tac Thanh
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
September 24, 2025

I am trying to build a Jira Automation rule that updates the reporter of an issue based on a custom field.

  • The custom field contains only plain text (e.g., “abcd abcd”), not an accountId.
  • I want the rule to:
    1. Read the text from the custom field.
    2. Use a GET request (/rest/api/3/user/search?query=<text>) to retrieve the correct user’s accountId.
    3. Take that accountId and use a PUT request (/rest/api/3/issue/{issueKey}) to set the reporter of the triggered issue.

The problem:

  • GET requests inside Automation don’t seem to return usable smart values ({{webhookResponse.body}} is empty).
  • Because of this, I cannot extract the accountId dynamically.
  • I don’t want to hardcode accountIds, since the text in the custom field can vary.

My questions:

  • what is the recommended way to dynamically map a text value in a custom field to a Jira accountId for use in Automation?

2 answers

0 votes
Bill Sheboy
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 Leaders.
September 24, 2025

Hi @MOOC Tac Thanh -- Welcome to the Atlassian Community!

In the rule images you show for the Send Web Request action, you have not checked the option to:

Delay execution of subsequent rule actions until we've received a response for this web request

Thus the rule continues to process before the response.  Please enable that option and re-test your rule.

Kind regards,
Bill

0 votes
Marc - Devoteam
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 Leaders.
September 24, 2025

HI @MOOC Tac Thanh 

Welcome to the community.

Set the value in the API call as follows: {{issue.<field name}}

So the call would be: /rest/api/3/user/search?query={{issue.<field name>}}

Use {{webResponse.body.accountId}} to get the account ID

MOOC Tac Thanh
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
September 24, 2025

I already use it, but 2025-09-24_155825.pngwhen loggging out the result I don't have value

MOOC Tac Thanh
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
September 24, 2025

and here is how I config my request : 


2025-09-24_160210.png

Marc - Devoteam
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 Leaders.
September 24, 2025

Hi @MOOC Tac Thanh 

What type of field is customfield 11038, what is the usual input (value of this field, give an example) and can you show me the details of the log action

Also what do you see as a value when doing a log action on just the field {{issue.customfield_11038}}

MOOC Tac Thanh
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
September 24, 2025

Hi @Marc - Devoteam , 

 

Customfield_11038 is a text field, I create this field to retreive user qTest who create an issue. So for example when I log action this field I have "Tac Thanh MOOC". 2025-09-24_170501.png

MOOC Tac Thanh
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
September 24, 2025

@Marc - Devoteam and here is my full log action :2025-09-24_171342.png

 

The lasted send web reqquest is where I use my PUT to update "Reporter"

Marc - Devoteam
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 Leaders.
September 24, 2025

Hi @MOOC Tac Thanh 

So you created a variable called qTestReporter

So then use the API call:  /rest/api/3/user/search?query={{qTestReporter}}

Other question what kind of Toke do you use a full API or a scoped API token?

If you use a scoped API token, then you need to use the API call like:

https://api.atlassian.com/ex/jira/<cloudId>/rest/api/3/user/search?query={{qTestReporter}}

Marc - Devoteam
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 Leaders.
September 25, 2025

Hi @MOOC Tac Thanh 

As @Bill Sheboy mentioned, check the option "Delay execution of subsequent rule actions until we've received a response for this web request"

Save the rule and run again

MOOC Tac Thanh
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
September 25, 2025

Hi @Marc - Devoteam ,

Regarding your question, I am using a full API token.

Hi @Bill Sheboy ,

Based on your suggestion, I tried using the option “Delay execution of subsequent rule actions until we've received a response for this web request” for both requests, and I also called the API using like @Marc - Devoteam suggestion : 

"https://api.atlassian.com/ex/jira/ <cloudId>/rest/api/3/user/search?query={{qTestReporter}}"


I still have the same result

MOOC Tac Thanh
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
September 25, 2025

Look like after my GET I receive an empty response

and the PUT request can't send with an empty value


new 1.pngnew.png

Marc - Devoteam
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 Leaders.
September 25, 2025

Hi @MOOC Tac Thanh 

What is the result when you just make the get in your browser or a tool like postman

So make a call in the browser window via: https://<your-instance-name>.atlassian.net/rest/api/3/user/search?query=Tac Than MOOC

or 

https://<your-instance-name>.atlassian.net/rest/api/3/user/search?query="Tac Than MOOC"

Above if the token is not a service account or scoped token.

Or is you use a service account or scoped token:

https://api.atlassian.com/ex/jira/<cloudid>/rest/api/3/user/search?query=Tac Than MOOC

or https://api.atlassian.com/ex/jira/<cloudid>/rest/api/3/user/search?query="Tac Than MOOC"

 

retrieve-my-atlassian-sites-cloud-id 

MOOC Tac Thanh
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
September 25, 2025

Hi @Marc - Devoteam 

For the call in browser with 

https://<your-instance-name>.atlassian.net/rest/api/3/user/search?query=Tac Thanh MOOC

or 

https://<your-instance-name>.atlassian.net/rest/api/3/user/search?query="Tac Thanh MOOC"

I have some information :
2025-09-25_140654.png

but with 

https://api.atlassian.com/ex/jira/<cloudid>/rest/api/3/user/search?query=Tac Than MOOC

or https://api.atlassian.com/ex/jira/<cloudid>/rest/api/3/user/search?query="Tac Than MOOC"

I have nothing : 


2025-09-25_140717.png

Marc - Devoteam
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 Leaders.
September 25, 2025

So if you now in you automation rule use

https://<your-instance-name>.atlassian.net/rest/api/3/user/search?query={{qTestReporter}}

or

https://<your-instance-name>.atlassian.net/rest/api/3/user/search?query="{{qTestReporter}}"

Then a log action

{{webResponse.boy.accountId}} should provide the account ID

MOOC Tac Thanh
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
September 25, 2025

No, I have an empty response2025-09-25_175822.png2025-09-25_180211.png

Bill Sheboy
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 Leaders.
September 25, 2025

Please try using the suggested URL for the endpoint from @Marc - Devoteam 

https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-user-search/#api-rest-api-3-user-search-get

 

And, writing the entire {{webResponse.body}} to the log to confirm the result when testing.  This should produce a list of zero-to-many values.

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
PERMISSIONS LEVEL
Product Admin
TAGS
AUG Leaders

Atlassian Community Events