Forums

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

How to use 'Reporter' field details in Script Runner

Mayur Gaikwad_Tech PMO
Contributor
January 22, 2025

Hi,

Have anyone tried fetching values from 'Reporter' field and use it for some operation in Script Runner?

Im trying to auto assign issues basis reporter details but its failing

1 answer

0 votes
Izabela França
Community Champion
January 22, 2025

Hello, @Mayur Gaikwad_Tech PMO . I hope you are doing well!

It seems that to assign a user in the reporter field you need to use their accountId. 
Here is an example of how this field is built when seen via API:

payload.png

 

When I had to assign a user to the reporter field via ScriptRunner, I had to get the user's account ID, and after that, input the information into the reporter field.

Let me know if it helps :)

Mayur Gaikwad_Tech PMO
Contributor
January 22, 2025

Hi @Izabela França 

Im doing good, thanks for asking!

I need to assign issues basis reporter information

e.g. suppose person A raises a ticket, so anytime if person A raises a ticket, it should get assigned to person B

Izabela França
Community Champion
January 23, 2025

Oh, I see. I believe the script will have to: 

  1. Get the accountId of the reporter
  2. Go through a condition that maps who will be the assingee (having the possible assingee accountIds "hard-coded")
  3. Input the accountId selected in the assignee field

 

This is one way I would go, but I would love to know more how you and other members of the community would do :D 

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