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

Using Automation to set Reporter from Body

We are trying to use Jira Automation (in Jira Cloud) to set the reporter field based on part of the body of the email.

For example, when part of the body of a request is "#reporter jsmith" (where jsmith is a username of a user different than the one sending the email), it should adjust the Reporter value. We have a similar need to do this with #assignee, as well.

This allows our service desk to submit tickets on behalf of other users without having to manually change the reporter after sending the request.

I've been trying a lot of different things, but haven't had success yet. I am thinking this may be because of the conversion from username -> user ID.

Here is an example of something I tried:


{
"update": {
"reporter": {
"set": {{issue.description.match("(?i).*#reporter\s*(.*)").asJsonObject("id")}}
}
}
}

I would love some feedback on the best way to do this, or to let me know if this isn't even possible.

Thanks!

2 answers

Hi @Matt Adorjan can you share the whole Automation configuration so I can test it and try to help?

Hi @Martin Bayer _MoroSystems_ s_r_o__ -

The automation I am trying is:

  • When: Issue Created
  • If "Description" contains "#reporter"
  • Then: Edit issue fields -> Advanced
    • The goal here is to look for #reporter and grab the username after it and set it as the reporter. Same behavior for #assignee.

jira-automation-1700918.PNG

Sounds like based on what Simeon Ross posted, that I may need to convert this to the user's ID first.

0 votes
Simeon Ross Atlassian Team May 23, 2021

Hi @Matt Adorjan

What is the exact value that you're trying to do? In the use of the reporter field, you can only set it via account ID. If you're not using their Atlassian account ID, it will not set.

Are these customers or normal Atlassian accounts?

Cheers,

Simeon.

Thanks @Simeon Ross !

I think you hit it on the head "you can only set it via account ID".

I have tried

#reporter jsmith

#reporter jsmith@acmecorp.com

For the #reporter field, they will be customers. For the #assignee field, they will be Atlassian accounts (service desk agents).

Some more background - we are just migrating from on-premise to cloud. We currently handle this with an add-on (ScriptRunner) but I wanted to see if I could eliminate ScriptRunner as much as possible and do this natively in Jira automation. However, it sounds like, in order to retain the same functionality, I may need to keep this in ScriptRunner and actually add a step that converts a username (jsmith) into the Atlassian Account ID.

-Matt

Simeon Ross Atlassian Team May 23, 2021

Hey @Matt Adorjan

So if this is just the reporter field, do you know if it just customers or if it could be your regular users as well?

@Simeon Ross that looks like it would work for our use case and actually potentially solves another problem we were encountering with creating customers!

2 follow up questions (#1 is most related to this, I can open a new question for #2 if needed):

  1. The part I need clarification on - are you able to share the example of how they are pulling the reporter from the body and putting it into a custom field?
  2. And then I assume this only works with service desk customers. Curious if there is suggested option for doing something similar, but for a field like "assignee" where the users would be already existing Atlassian Users.

Thank you for your help!

-Matt

Simeon Ross Atlassian Team May 24, 2021

Hey Matt,

I'm afraid I'm not sure how they are doing that but if you can provide a sample of one of your bodies we might be able to figure it out?

Cheers,

Simeon.

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

281 views 8 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