In JIRA SD, the ticket description has an HTML table in that there is a phone number .
I wanted to extract that and update it in the "User Phone Number" field using the automation rule below. But it's throwing an error and not working. Used different smart values. Out of those some ..
{ "fields": { "customfield_15023": { "value": "{{issue.description.match('(010[0-9_.+-]+)')}}" } } }
Error: Char can't be parsed from: '010[0-9]{8}')
{ "update": { "customfield_15023": [{ "add": {"id":"{{issue.description.match('(010[0-9_.+-]+)')}}"} }] } }
Error: Failed to get value for issue.description.match('(010[0-9_.+-]+)')
Several of the characters in the character-class for the regular expression are reserved, and so they need to be escaped.
You note the Description field contains a table in HTML. Are you certain it is HTML or is it the rich text, table markup for the field (using pipe characters)?
Regardless, it is likely both formats have embedded newline characters in the field and that impacts the behavior of the match function. I recommend replacing the newlines with spaces to help the match:
{{issue.description.replace("\n", " ").match...
I recommend using a test rule which just writes the Description to the audit log, as well as what you parse with the match() function. That will help to incrementally improve your regex until you get the desired result.
Kind regards,
Bill
Some how this worked for me(Though not so accurate).
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Whenever you ask for help with an Automation Rule it will help us to help you if you provide:
1. what type of project is this (e.g., company-managed, team-managed, etc.),
2. images that show your complete rule.
3. images showing the details of any relevant actions/conditions/branches.
4. images showing the Audit Log details for the rule execution.
5. Explain where the issue is.
These questions are not for not willing to help, but to have community members understand on how automation works.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Its a Service Desk project.
Somehow phone number is not getting fetched from Description of the ticket/JIRAissue.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
What is the audit log showing and how does the description look like on an issue.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
1st thing to do.
Add a log action in you automation, log action to take is: {{issue.description.match(".*010: (\S+).*")}}
What will be stored in the log action?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.