Hi,
A Jira smart value question in an automation rule :
In the description of a Jira issue i captured a string until this string ends with a new line. This works fine.
{{issue.description.substringAfter("Subject").split("\n").first().
However, sometimes instead of a new line (\n) the string ends with a horizontal line (---). Hoe can i combine this (thus new line and horizontal line).
Regards, Will
How often do you expect the "---" text in your Description, in what format / length, etc.?
You could try first replacing multiple occurrences of hyphens with a single newline using the replaceAll() function and a regular expression. For example:
{{issue.description.replaceAll("(\-{3,})", "\n").split("\n").first}}
When you expect multiple hyphen sections / horizontal lines, you may need to account for which record to access, rather than assuming it is the first one.
Kind regards,
Bill
Hi Bill,
With your reply eventually i wrote {{issue.description.substringAfter("Subject:").replaceAll("---", "\n").split("\n").first()}}.
I tested it and i sent it to the consultant. It looks that it's okay.
Thank you for your support.
Regards, Will
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.