Hi there, I've been trying to get our email template (leveraging JIRA SD's new Project Automation features) to pick up images and (eventually) other unparsed content as well.
Here are some of the variations of the regex I have tried:
.replaceAll("!(.+?\.\w{3,4})\|width=(\d+),height=(\d+)!/gi", "<img src='$1' width='$2',height='$3'")
.replaceAll("/!(.+?\.\w{3,4})\|width=(\d+),height=(\d+)!/gi", "<img src='$1' width='$2',height='$3'")
.replaceAll("!(.+?\.\w{3,4})\|width=(\d+),height=(\d+)!/gi", "<img src='\1' width='\2',height='\3'")
and several other forms of it.
When I plug in the values on regex101.com, it finds the match no problem.
https://regex101.com/r/LNcuqg/1
Can anyone see what i'm doing wrong? I would love to be able to parse the images and translate them into html using regex so we can have inline images for our ticket reply emails! Happy to provide any additional info needed.
I feel like this would probably help others too. I can't find anything online that is JIRA Service Desk specific. (Yes, I've read the documentation)
I am also experimenting with this. I was not able to use $2 at all, only $1 appears to be working. Thus I struggled to obtain what I want inside $1, when not possible I continued the text processing with another replace() to remove leading and trailing characters
Also checking matches only does not help, you need to make sure $1 is what you want in your testing tool.
Finally, I got some results but then while $1 value looks OK in the testing tool in Jira automation I am always missing the last character for some reason... Still debugging
Please attach an image of your automation configuration. I'd like to take a look at that in order to replicate on my own system.
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.