I am trying to use automation and want to place a value from the description to a custom field.
Eg Description contains -
Brush Size: 2
Paint: Blue 2291 54
Wall#: 34
i have a custom field called Paint and to map the value to that field, i am using the following:
{{issue.description.substringBetween("Paint: ","Wall#: ")}}
its returning: Blue 2291 54{color} {color:#172B4D} as its reading the color of the new line between 1st row of "Paint: " & "Wall#: "
Is it possible to use between function for capturing strings between a string and a new line?
thanks in anticipation
Hi @Rajeev Chaudhary -- Welcome to the Atlassian Community!
Yes, that is possible. Try to split the description on the newline character first, producing a list of lines. That will simplify your search using a regular expression with the match() function. For example:
{{issue.description.split("\n").match("Paint:(.*)").trim()}}
Please adjust as needed if you need to remove/add any spacing.
Kind regards,
Bill
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
This also solved a problem I was having; thank you very much!
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.