Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,300,187
Community Members
 
Community Events
165
Community Groups

How can I automatically change a user field using an email address from the description?

Hey All,

 

Here's the situation: we have an external form that anyone can fill out. It collects a name, email address, phone number, and a comment. This information is then emailed to our JSM project by a standard emailer.image of desc.png

 

Since the standard emailer is the received email address, it becomes the reporter (not shown in image). However, we want the email field in the form to become the reporter.(helloworld@example.com). 

 

I'm using Automation to try to accomplish this. I create a variable to parse the email out.

`{{issue.description.substringBetween("Email : ","Phone #:")}}

automation screenshot.png

Then I edit the issue using the advanced option.

{
"fields": {
"reporter": "{{reporteremailaddress}}"
}

automation screenshot2.png

However, I'm not having much success, and I think it's because of the info pane in this Atlassian support article. "Due to recent GDPR changes, referencing user fields (such as reporter, assignee) now require the property id to be set with a user's account ID rather than using name."

 

Is there a way to make the email address the reporter? Or create and then pull an accountId from an email address? 

 

Am I going about this all wrong and there is a much easier way to change the reporter?

Thank you for your help!

1 answer

Hello John!

My first question:

Is the user that is filling out the form with their email address (helloworld@example.com) already a user in Atlassian? They would need to have an Atlassian account to be able to be the Reporter.

Let's start there. Let me know,

Hi Garrett!

Thanks for reaching out! The helloworld@example.com user sends in a request form that gets formated as text and send via email to our JSM project email address. This request form is NOT a Jira form; it is just a standard web form that lives on our website. The data (which includes name, phone number, email address, and message) are sent in the body of the email.

This email is sent by a fixed web mailer with an email address that is always the same. This web mailer is our "customer". We want the email address in the body to either:

  1. create a new customer and assign it to the new customer or
  2. search for and assign it to the existing customer

 

I've figured out how to accomplish option #1 using the details from Solved: How to get <username> after "Add new Service Desk ... (atlassian.com). It is depicted in photos #1-#3.

variable.pngnew_customer.pngedit issue.png

I haven't figured out how to change the reporter to an existing customer based on an email address. It doesn't look like Automation has a programmatic way to lookup a user's account id based on email -- just the manual/static way.

lookup.png

 

Edit: formatting.

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
PREMIUM
PERMISSIONS LEVEL
Site Admin
TAGS

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