Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Deleted user
0 / 0 points
Next:
badges earned

Your Points Tracker
Challenges
Leaderboard
  • Global
  • Feed

Badge for your thoughts?

You're enrolled in our new beta rewards program. Join our group to get the inside scoop and share your feedback.

Join group
Recognition
Give the gift of kudos
You have 0 kudos available to give
Who do you want to recognize?
Why do you want to recognize them?
Kudos
Great job appreciating your peers!
Check back soon to give more kudos.

Past Kudos Given
No kudos given
You haven't given any kudos yet. Share the love above and you'll see it here.

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Change Reporter using Automation Edited

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..

 

Screen Shot 2019-02-13 at 4.02.59 PM.png

 

 

5 answers

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]

Thanks Brydie!  I’ll give that a try.

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)

  • When I try to use displayName, the automation succeeds, but the reporter ends up anonymous.
  • When I try to use name, the customer is not found (but I'm just sending through the customer's name, not the identifier it seems to need)

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):

Screen Shot 2019-02-14 at 8.57.58 AM.png

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

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?

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.

I'm having the same issue with updating the reporter based on an email address... does anyone have any clue with this?

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"}
  }
}

 

Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase
Published in Jira Service Management

JSM June Challenge #2: Share how your business teams became ITSM rockstars

For JSM June Challenge #2, share how your non-technical teams like HR, legal, marketing, finance, and beyond started using Jira Service Management! Tell us: Did they ask to start using it or...

299 views 9 7
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you