How do i get a red html style in a jira ticket to be replaced in a email notification as red?

Tory Dennis April 4, 2023

When filling out a field in Jira to send out a notifications via automation, sometimes people copy and past red font words. example below:
Package name.PNG

When the email is sent the field shows the name as well as the HTML style. example below:

Package name:

{color:red}testing email notification{color}

 

Is there a way to either remove the HTML style from {color:red}testing email notification{color} when sending out a notification or get Jira automation to recognize the HTML style and set it as red.  Below is the section that contain the place holder for Package names:

<b>Package name</b>:</span><span style='font-size:12.0pt;color:#201F1E'><o:p></o:p></span></p> <p style='line-height:11.55pt'><span style='font-size:10.0pt;color:#201F1E'>{{issue.Package name}}<o:p></o:p></span></p> <p style='line-height:11.55pt'>

 

1 answer

1 accepted

0 votes
Answer accepted
Bill Sheboy
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.
April 4, 2023

Hi @Tory Dennis 

I believe you can remove the field editor markup from the fields using the text format, such as with: {{issue.description.text}}

However, if you have actual HTML in the field that is not going to be removed using this method.

Kind regards,
Bill

Tory Dennis April 5, 2023

@Bill Sheboy  So the issue im finding is that the field for (Package name) is being used in a transition screen placed in the workflow our in the project we use for our jira tickets.

From reading the documentation for jira I am unable to edit those field, only add, remove or change the placement but I also see in the workflow where i can edit the options for that screen. Would that be where i need to make the change to see if i remove the field editor markup?

transition properties.PNGlayout.PNGscreen transitions.PNG

Bill Sheboy
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.
April 5, 2023

Perhaps I misunderstood your question...

I thought you had a Jira issue with a field that contained markup, and that you were then using an Automation for Jira rule to send an email.  Is this what you are doing?

Tory Dennis April 6, 2023

@Bill SheboyYes that is what im doing, sorry for the confusion. I was only adding examples since im still new to Jira and im not sure where to correct this issue at.
I have added a screenshot as well of what the field looks like and how we are filling it out as well as highlighted the issue.

Due to people copy and pasting in the Package name i thought it should be able to handle any color and font but it does not convert the color in the package name field during the transition screen.

Only in the jira ticket itself as the example from my first post shows does it show the color change to red for testing email notification underneath the Package name field.

So when using an Automation for Jira rule to send an email it keeps the same format as plain text with the {color:red} added beside it instead of changing the plain text to red.

transition screen.PNG

Bill Sheboy
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.
April 6, 2023

Thanks for confirming that.  Let's try using that text format with your field in the rule's email action, such as with:

{{issue.Package name.text}}
Tory Dennis April 10, 2023

@Bill Sheboy  This has corrected my issue, thank you!

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
PREMIUM
PERMISSIONS LEVEL
Site Admin
TAGS
AUG Leaders

Atlassian Community Events