Uploaded image for project: 'Automation for Cloud'
  1. Automation for Cloud
  2. AUTO-755

Using {{issue.description}} smart value with {color} tags in the description breaks Automation Send email action

XMLWordPrintable

    • Severity 3 - Minor

      Issue Summary

      The Send email Automation action allows users to add smart values to the Subject line.

      This allows dynamically populating data such as issue keys ({{issue.key}}) for those users. However in certain circumstances when Text color is set in an issue's description the format of the description causes an issue within the outbound mail server and the email fails to be sent.

      The above issue occurs when the subject is using {{issue.description}} and the description contains text with specific color attributes.

      Steps to Reproduce

      Ticket setup:

      1. Create a ticket within Jira (this was specifically tested on a Jira Service Management project)
      2. Add some arbitrary values such as "Test", "Testing", "Example" to the description split into individual lines
      3. Highlight the value from the above step and select a value within Text color

      Test

      Testing

      Example

      Automation setup:

      1. Create a rule that is triggered manually (other triggers also are impacted)
      2. Add the Send email action
      3. Provide an email address and within the Subject field add the following: {{issue.key}}-{{issue.description}}
      4. The description can be set to anything

      Trigger the automation from the Jira issue that was created.

      Expected Results

      The automation rule runs successfully and the user specified as the recipient receives the email. The audit logs confirm email was generated and sent:

      Send email
      Successfully sent email for issues (with message ids):
      EXAMPLE-28 (dd80287b-ee68-4062-cc50-b80d350b6172)

      Actual Results

      The rule runs successfully and the audit logs show a successful message sharing the transaction id for the email, however the user never received the actual email message.

      Workaround

      Based on testing, HTML encoding the description allows mail delivery to succeed, the documentation for this can be found at: Jira Smart Values - Text fields - HTML Encoding. What this would look like in practice:

      {{issue.key}}-{{issue.description.htmlEncode}}

              Unassigned Unassigned
              f189ef36d400 Andras M.
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                Resolved: