You're on your way to the next level! Join the Kudos program to earn points and save your progress.
Level 1: Seed
25 / 150 points
Next: Root
1 badge earned
Challenges come and go, but your rewards stay with you. Do more to earn more!
What goes around comes around! Share the love by gifting kudos to your peers.
Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!
Join now to unlock these features and more
The Atlassian Community can help you and your team get more value out of Atlassian products and practices.
Overview
I'm using a Jira Cloud app (Relay Intake Forms) to create rich external forms to submit to my Service Desk.
Issue
One of the downsides of that app seems to be no field mapping for reporter. So all issues created via the form are from a single app-created user.
I obviously want my users to be able to access the issues they created, so I need to change the Reporter to who is actually submitting these forms.
Failed Resolution
I created a custom field for "user email". I'd like to create an automation that upon issue creation, changes the reporter to the contents of the custom field "user email".
I'm not too hip to the exact code I should be using (or if this is even possible).
Here's what I tried under advanced:
{
"fields": {
"reporter": {
"emailAddress": "{{customfield_116130}}"
}
}
}
How far off base am I? 🙂
Here's my automation, I have a precondition that first adds the customfield for the username and email address as a customer to Jira Service Desk (this part works!).
Then it checks if the reporter is the "system defined user" from the other app I use for user forms. If it is, then change the user to the customfield for emailaddress.
I've tried various ways of inserting the reporter (email address, name, key) and none have worked. It currently is successful on editing the issue field and changing the reporter, but the reporter now shows as "Anonymous" in the issue..
Community moderators have prevented the ability to post new answers.
Hello,
I've just recently looked for such a solution to actually take the email address from a summary or description (field substring smart value operation) and use it to update the reporter field on our tickets.
How I'm doing it is by a Webhook request to the Jira API to fetch the user based on the user/search endpoint and from there using the response to populate the reporter field id.
Send web request
Domain: Your company domain
Email: The email you want the accountId for
Token: The Authorization token required for the API call.
Edit Issue
These automations are the basic requirements for the function to work but I would suggest using some error handling for "webResponse.status = 200" and maybe some variable creation as well error handling for if there were more than one webResponse.
Hope this might help someone.
I'm having the same issue with updating the reporter based on an email address... does anyone have any clue with this?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I have contacted support and the answer is no - this not possible yet.
We can vote here to get this feature: https://codebarrel.atlassian.net/browse/AUT-1447
My workaround is to use a small microservice and the JIRA REST API to get the job done.
a) Query the reporter and remember the "id"
https://xxxx.atlassian.net/rest/api/3/user/search?query=mail@example.com
b) Set the reporter using the "id" though the API:
https://xxxx.atlassian.net/rest/api/3/issue/DESK-3
PUT Payload:
{
"fields": {
"reporter": {"id":"the:id-goes-here"}
}
}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Anthony Polakos ,
Did you manage to get this to work without anybody having to manually select themselves via a userpicker form?
You can set the customer you just added as a new customer to reporter with this:
{
"fields": {
"reporter": {"id": "{{customer}}" }
}
}
I'm still struggling with customers that have send in a form before. They already exist in our project and therefore they don't trigger the 'add new customer'-step anymore, which means the 'customer'-fields aren't populated.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Anthony,
I don't believe the Jira API allows us to set the reporter via the email address only via username. You would require the users to specify their username instead.
Cheers,
Brydie [Automation for Jira]
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Unfortunately, that didn't seem to work, but I appreciate the help!
Which of the reporter fields do I need to send through?
name (which looks like a unique identifer / random string, I'm really not sure I would procure since the user is being created on the fly)
or
displayName (This I can get from the customfield)
Big question is how would I go about getting that unique identifer for the user to send thru when the user is being created during the process?
---
Typical API response for an issue with a reporter (that does have a customer attached to it):
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
I've managed to get this working using the following:
{
"fields": {
"reporter": {
"name": "{{issue.User Picker CF.name}}"
}
}
}
Where I have a custom user picker field where the user needs to select themselves. That way I can access the unique identifier in that field. Not sure if having the extra field is a feasible option for you.
Cheers,
Brydie
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Is the issue that you need a way to find the JIRA username for a given Display Name or email address, in order to be able to set it?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Community moderators have prevented the ability to post new answers.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.