The following information is my approach on how I handled email signatures within my organization and how Jira processes them into tickets. One of the biggest complaints I've had from my users is how Jira handles email signatures especially those in email threads from replied or forwarded emails. When a user includes our email support distribution lists on a large email thread, the auto-created ticket would explode with all of the email signatures, and it makes the ticket hard to read.
Jira today does a really good job of detecting and collapsing the primary signature, but it only does the signature of the user that sent the email that caused the ticket to get created. The signatures in the email thread get missed. The following setup is my approach to address this scenario.
This method also maintains the message headers within the email thread so your ticket will maintain who sent the response within the ticket as well, so you don't have to rely on the email signature for that.
Here is an example ticket output from the setup below after the signatures were removed:
Within our organization, we use an app within Outlook that normalizes and auto-applies signatures to all our users. We are currently using Code2 to accomplish this. This allows us to use a defined template, designed by our marketing team, for all users and then pass in the user specific variables (name, email, phone, etc) for the specific user while they are drafting their email. Controlling the signatures is simple HTML code for creating the template configured in the Code2 platform.
Because of our use of this signature app, I was able to encapsulate the primary and reply signature templates with unique text strings before and after the signature. I tried to make these strings appear to be part of the signature just in case our user's noticed them. For the purposes of this example, for the start of the signature I used 4 white dashes, "----", and at the end of the signature I used 4 white underscores, "____". I made the text for these white to try and hide them from the user so they wouldn't be tempted to remove them.
Note: I got lucky with this because while the user is drafting the email, these 4 white characters don't actually appear in dark mode but they are there and after the user sends the email, they can then see them. This is the behavior I noticed on the new Outlook and Web Outlook. I'm not sure what happens on the old version of Outlook.
Example image of signature (notice the top and bottom characters before/after the signature area):
For the signature itself, that is all that was needed.
To setup the processing of the ticket to handle these signatures, I performed the following:
Please note: there is probably a cleaner way to set this up. Once I got it to work, I left it alone. I'm sure you can understand that feeling.
Here is my process (screenshots below):
{{issue.description.remove(issue.description.substringAfter("{adf}"))}}
{{descOne.remove("{adf}")}}
{{descTwo.replaceAll("(?s)\\{color:#ffffff\\}----\\{color\\}.*?\\{color:#ffffff\\}____\\{color\\}", "")}}
Screenshots below of the full process and example of our signature.
Variable 1: descOne setup
Variable 2: descTwo setup
Variable 3: descThree setup
Last step: Assign the result to desc
This was my approach to handling email signatures in Jira. I know its not a clean approach and it has some risks but it is working out very well for my organization. Hopes this helps any of those looking for a solution that doesn't involve additional apps or scripts to process your tickets. You can take this same approach for comments that are added to tickets via email.