Hello everyone,
I use the mail handler from JETI to create issues based on HTML emails. This works as desired.
Because the body has a complex table structure, the result needs improvement. I would like to use Jira Automation for this. Simple text replacementsr [replace(String target, String replacement)] work well.
I want to remove the table in the header. As can be seen in the picture, the text to be target is spread over three lines.
I tried to identify the breaks with different variants - \n, (\n), \r, (\r), \r\n, (\r)(\n), \\. Unfortunately without the desired success.
What am I misunderstanding? Do you have a suggestion for me?
Thanks in advance!
Regards Ralf
So it looks like it is using wiki notation. You could grab the the first 6 pipes and just replace it with nothing.
regex to grab the first 6 pipes: [|]{6}
The idea is not bad. I tried the replacement. But it doesn't work :(
Do you have an idea why it doesn't work?
Regards Ralf
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Yea testing that out I can't get it to work. We could just eliminate everything up to a certain point though. Are all the notifications in the same format? If so, you could use the below regex to match everything up to the 9th pipe and replace that with nothing.
^([^|]*\|){9}
Before
After
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
What if you use:
{{issue.description.substringAfterLast("*(color:#BE")}}
or simillar approache?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Since I don't want to remove the entire header, this doesn't seem like a good solution for us.
Regards Ralf
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I respectfully suggest it can be quite difficult to remove all the possible markup from the source *and* not lose any content within an automation for Jira rule. If you can find a way to send the source email as plain text, perhaps try that first.
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.
Hi @Bill Sheboy
we get the mail from an external agency. Unfortunately, it is not possible for us to select the output medium.
In order not to lose information, I want to define and replace the target as precisely as possible.
Attached is a sample and my current automation rules: EML-File / Automation-rule
Regards
Ralf
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.