Project - Reference Number: XX1-0111-AAProject - Version:
Trying to get the underlined number copied into a custom field:
RegEx: {{issue.description.match("(?<=Reference\sNumber:\s).*?(?=Project)")}}
Hi @Tyler Stephens -- Welcome to the Atlassian Community!
What is happening when you run your rule? And, what are you seeing in the audit log?
Best regards,
Bill
Hey @Bill Sheboy
Thank you!
When I run the rule, the audit log shows it being successful and the field being successfully modified. However, the field is still left blank.
Thanks,
Tyler Stephens
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks for that information. Given no errors in the audit log, I wonder if either:
Maybe try writing with the Log Action to the audit log, gradually building up your RegEx until it stops working. For example, add log lines for:
Note that you may need to use a suffix replace() function at the end to remove extraneous text if you only want the reference number in the custom field.
What do you think?
One note: If you have typos in your RegEx which cannot be parsed, the publish function for rules can hang/time-out. So consider incrementally making changes so you can always fallback to an earlier version if you need to exit the rule editor.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hey Bill,
I took your advice of using
and I discovered that it is pulling the styling elements of the email, so this must be what is interfering with my RegEx.
I need to figure out a way to remove the styling elements from an Email Request now...
Thanks for your help!
Tyler Stephens
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You may want to check on Stack Overflow, as there are some examples and gotchas for removing styling elements with RegEx. You could also get close with RegEx, and then use the automation rule text functions to remove/replace remaining elements.
Please post what you learn as others in the community will no doubt be interested. Thanks!
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.