Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Trim the Summary of ticket that is received through the Jira email handlers

Lakshmi CH
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
August 12, 2025

Hi Team,

I am looking for a regex solution to trim the summary of a Jira ticket that is generated from the incoming email handler. Before creating the ticket, I want to extract only the relevant part of the summary and use it as the ticket summary.

The original ticket summary reads: "The following 1 documents have been received from Vendor Company Name:," but I want the summary after ticket creation to simply be "Vendor Company Name" instead of the full line. 

NOTE : The company name always changes depending on which vendor we receive the email from.

 

trim.pngautomation.png




3 answers

2 votes
Sergio García-Consuegra _Decadis AG_
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
August 13, 2025

Hi @Lakshmi CH ,

My name is Sergio, a member of the support team from Decadis. I would like to suggest you an approach using our app Jira Workflow Toolbox.

You would only have to add our "Update fields" post-function, and then update the "Summary" using the following expression in "General" mode:

%{trim(toString(findPattern(%{issue.summary}, "(?<=from).*$")))}

 This expression will obtain all the text after the "from" and make a trim as required.

And then, at last, you should only have to add the following expression in the "Conditional execution" section of this post-function:

"have been received from" IN %{issue.summary}

With this configuration, you can automatize this project in the "Create" transition for those projects where you are interested in updating the summary if it has been created by the mail handler you are currently using.

If you have any doubt regarding this approach or you would like to know more about our app, feel free to ask!

Hope you have a nice rest of the week.

Best regards,
Sergio

0 votes
sai chinamuthevi
Contributor
August 12, 2025

Hi @Lakshmi CH 

I worked on this on my test instance, its working fine for me. Please review the screenshot.
I have done this from summary to description and you can update this accordingly to your requirement.

Reference : 

{{issue.summary.replaceAll("^[\\s\\S]*?from\\s*:?\\s*","").replaceAll("\\s*[:,].*$","").trim}} is waiting for document review.


Screenshot 2025-08-13 110725.png

Lakshmi CH
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
August 13, 2025

Hi @sai chinamuthevi ,

Its not working in my case. Its still showing full line. should I change anything else.




0 votes
Utkarsh Agarwal
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
August 12, 2025

Hi @Lakshmi CH 

Did you try the following:

{{issue.summary.extractRegex("(?i)from\s+(.+):").trim}}

 Hope this helps!

Kind Regards
Utkarsh

Suggest an answer

Log in or Sign up to answer