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.
This workaround is meant to help projects where it is necessary to get information from an email request's description field and enter it into specific Jira Custom fields. This saves time in a daily routine by not having to enter the values manually.
For this, we can utilize Automation For Jira (A4J) with some Jira Custom Fields. I used an Email request related to HR - New Hire as an example, where a user will send the new hire information via email based on a list.
You will need system automation to load the same default list in your browser email - this process can be done with iCIMS or other tools automation in your system. This method can be used for other purposes like Email Requests containing a shopping list, an incident, etc.
Important related documentation:
Smart values - text
Text functions
Regular expressions
I was able to get the information by rows in the Description field and throw that information into Jira's fields.
The bulk of the work is done by the Smart Value match() expression with Regular expressions in A4J.
This example would capture the entire Description, which isn't very useful.:
{{issue.description.match("(.*)")}}
The feature we will be using from Regular Expressions is the Capture Group:
The Regular Expression will take different forms depending on what you are trying to capture, but here is a practical example to give an idea of how it can be used.
Let's say the Email Request creates an Issue with a Description with this Information:
Employee Name: John Doe
Employee Number: AB00123
Hire Date: 31/02/2023
Each of these Smart Values will capture their respective lines:
{{issue.description.match("^Employee Name: (.*)$")}}
{{issue.description.match("^Employee Number: (.*)$")}}
{{issue.description.match("^Hire Date: (.*)$")}}
Written plainly, they are saying:
Where all require that the Strings it is checking for are at the beginning of the line.
You will be able to get the row info after this delimited text. The automation rule will work as in the screen recording below:
Note: The email must be without any formatting, otherwise, it will copy the HTML for color, letter format, etc, as shown in this screenshot:
Bruno Altenhofen
0 comments