Hi Team,
We have an automated email ticket creation using a script that takes certain keywords from the email body and adds them to the ticket summary. However, the summary's formatting is not displaying correctly. Is there a way to use a JMWE post-function, Nunjucks, to trim the summary before creating the ticket (correct the summary)
I've attached a screenshot for reference; the section marked in red is common across all tickets, but in the total:1, the numbers vary all the time. We would like to trim that part.
Here is a solution using Jira Automation (native in Cloud, or installable in Data Center via Atlassian's official app):
Automation Rule:
{{issue.summary.replaceAll("total: \d+", "").trim()}}
It will remove any total: <number> from the summary.
Original summary:
*Order 123, Ready to go total: 1
Updated summary:
*Order 123, Ready to go
Original summary:
*Testing Status total: 25
Updated summary:
*Testing Status
The same regex pattern should also work with a JMWE post-function using Nunjucks, although I haven't tested it directly as I don’t have JMWE installed at the moment.
Hope that helps!
I would need to experiment to know for sure, but that seems like it could be a job for slice:
`{{summary.slice(1, -10)}}`
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.
Hi @Jim Knepley - ReleaseTEAM , I am sorry, Please find the attached one.
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.