Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Need a jira cloud automation to update the reporter from custom field which contains email

Manmohan Anand March 19, 2024

Hey Folks,

I have created a google form which creates JIRA ticket used by the sales team (They prefer creating tickets via Google form than JIRA). Since the script uses REST APIs which is authenticated using my tokens hence all the tickets which are created using google form has my name as Reporter.

I have the sales team email address in a custom field which I want to set as a reporter. Figuring our if there is any jira cloud automation exist which can update the reporter field using the email. Please note, all of these sales users have jira associated email.

Thanks in advance for the help!

1 answer

1 accepted

1 vote
Answer accepted
Ryan M
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.
March 19, 2024

Hey @Manmohan Anand 

The only way I can think of to set users based on a custom field value would be advanced field editing using JSON. https://support.atlassian.com/cloud-automation/docs/advanced-field-editing-using-json/. This requires the users ID, though, email is not sufficient.

You're going to need your initial script to run another API call before creation, and run a user search or find all users call (/rest/api/3/user/search) to get the accountID of the user you want to be the reporter. At this point, an automation becomes useless though. You now have the user ID and can set it as the reporter during your initial Create Issue /rest/api/3/issue API call.

Personally I would just make them use a JSM form. Unless this preference for google is saving the business time/money/doing something valuable that it can't, developing custom scripting to do something that's simple and built in is just creating tech debt/advanced configuration to maintain.

Manmohan Anand March 19, 2024

Hey @Ryan M Thanks for your quick response. Yes I did add the user search by their email via the REST API call (/rest/api/3/user/search) which provided the accountId which later used in the script to set the reporter. It's working as expected.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events