Hello!
The title of my issue is on the description. I want to put it on my summary when the issue is created. The title is always between "Titre:" and "Client" in the description.
The regex (?<=Titre :\s).*(?<!Client) works fine on regex 101 :
I tried to use the Edit field on the automaton and the advanced version.
Edit field :
{{issue.description.match("(?<=Titre :\s).*(?<!Client)")}}
Advanced version :
{
"fields": {
"summary": {{issue.description.match("(?<=Titre :\s).*(?<!Client)")}}
}
}
Am I missing something to make the regex work or it's something other then Match that I need to use?
Thanks!
Hi @Elizabeth LC and welcome to the community,
I would use {{issue.description.substringBetween("Titre", "Client")}}
Hi @Elizabeth LC -- Welcome to the Atlassian Community!
Adding to Alex's answer...
Your original regular expression was missing a capture group for the value you wanted, and you marked the other groups as non-capture. You could try inverting to remove the parentheses grouping for the prefix and suffix and only include them around the desired capture with (.*)
And even with those changes...the documentation for the automation rule match() function says the implementation of regex is based on the Java one, and so perhaps all of the regex features you are using are not supported. Just something to note for the future.
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.
{{issue.description.substringBetween("Titre", "Client")}}
I added it on the edit field summary and it works like a charm.
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.