We receive an issue via an email from a customer with their reference in the summary field that I want to extract and populate into a custom field automatically.
Summary title:
REQUT0000504781 - 20180815- Incident Report A0007
From the above summary field I would like to extract 504781 and populate another custom field with this number only.
Using the automation pro plugin I have done the followlling:
When: Issue created
IF: Issue matches JQL
summary ~ "REQUT00*"
Then Edit Issue Fields
{{issue.summary(?=REQUT0000(\d*))}}
The "Then" statement above is incorrect however it looks ok within an expression builder from https://regex101.com/
Can anyone offer any further advice / help on this please?
Hi Craig,
The correct smart value would be:
{{issue.summary.match("REQUT(\d+).*")}}
Let me know if that works for you.
Cheers,
Scott
Is there documentation on this? I would like to read up on using regex and smart values.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hey @Scott Harwood
I appreciate the knowledge you've provided here! I'm curious as to what segment of the above smart value I use to reference the custom field ID/Custom Field?
Greatly appreciated,
Dan A.
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.
I'm unsure if you have Jira Workflow Toolbox but you can create a post function that will help with it.
I am not adept at regex but there is a parser you can use and it explicitly says regex can be used.
This may be a better option than using project automation, I'm unsure if it accepts regex.
Below is "Copy a parsed text to a field" post-function.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks for your response. I don't currently use Jira Workflow Toolbox but I will install it on our test Jira environment and take a look.
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.