We are using Jira to track tasks for developing internal software tools for our employees. To allow company employees who don't have Jira to report bugs or suggest features, we created forms for suggestions or bug reports.
When a non-Jira user submits to the form, their email address is saved in a comment like this:
"This work item was created based on someone's response to a Jira form. Email address: [Email Address Here]"
I noticed that my existing automation rule (Send Email to Reporter) does not work because these users do not have Jira accounts, and that the email account is not stored in a column.
To try a workaround, I added a custom text box in the form to enter the user's email address. This field is saved to the issue under the Reporter Email column when the form is submitted.
I want to send an email using Jira Automation to the email address entered in that custom text field. Such as:
Question:
Thanks!
Hi and welcome to the community!
This is absolutely possible using automations. I understand that the users email is stored in a custom field in the ticket? If then you can do as follows:
1. Find the id for the custom field by navigating to Settings > Issues > Custom Fields. Click on the "More" menu (three dots) next to the desired field, then select "Edit Details" or "Configure". The ID will be part of the URL, typically in the format customfield_xxxxx.
2. Create the automation using the custom field id as a smart value for recipient (in my case the custom field id is _10141)
You can build on this example and use a transition as a trigger to send emails as well
Best regards,
Staffan
Are you sure that you can embed HTML into the content field? This wouldn't really be a secure way.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Yes I am sure it works, i have just tested it my sandbox environment.
If you don't want to embed the HTML you could just refrence the issuekey and issue descption as a smart value instead. In this case it would actually make more sense since the customer don't have access to Jira so the hyperlink does not really help.
The example is based on information from a official Atlassian support page:
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Just wanna check in with you. Did the proposed solution work or is there anything else you need help with?
If the solution worked, please mark the answer as accepted to help other community members to find working solutions
All the best!
/Staffan
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I actually tried another solution yesterday, what I did is as follows:
I discovered that Automations supports Regex, so I used it as a way to extract the email from the first comment in the thread. As submitted forms always have a comment with the non-Jira user's email.
I used the following for my To:
{{issue.comments.first.body.match("([a-zA-Z0-9_.+-]+@[a-zA-Z0-9-]+\\.[a-zA-Z0-9-.]+)")}}
And then, since our company email is formatted with firstName.lastName@company.com, I also used Regex, and smart values:
{{issue.comments.first.body.match("([a-zA-Z0-9]+)(?:\\.[a-zA-Z0-9._%+-]+)?@").capitalize()}}
So the person's first name can be extracted and capitalized to FirstName.
I did this since I realized that adding a textbox for email would have the non-Jira user do extra effort to enter their email address twice (first as required by Jira forms, and second is for my custom textbox). But maybe I can make another automation to copy that email from the first comment, to that custom textbox instead, so the non-Jira user will only have to enter their email once.
But thanks again for yours and @Michael Wohlgemuth 's suggestions, I will try them later.
Thank you!
- Johannes
Edited to redact personal info
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
That is a brilliant solution! I will bookmark it for future use.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello!
you could create an automation that sends a mail on the trigger of your choosing (in the screenshot - "Work item transitioned" - but many do exist.
I just tested it with one of my random gmail adresses which is unknown to the jira im in, and it worked.
So, in essence: use a field which holds the email address, and then just use a "smart value" in the recipient part of the "send email" action of the automation.
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.