The "Send customised email" action throws "Invalid value provided for the required field: body" error for Rich Text content when there are empty bullet points

XMLWordPrintable

    • Severity 3 - Minor

      Problem

      The Send customised email action throws the Invalid value provided for the required field: body error when a mail is in Rich Text format and the mail body contains empty bullet points.

      The problem is specific to the following configuration:

      • The Send customised email action
      • Rich Text in the Content Format field of the Content tab.
      • You can have multiple smart values in the email content, but at least one smart value should be empty. For example, If it is about the customfield_xxxxx field, the field should be empty on the work item.
      • All the smart values should have code-style formatting and ** should be listed as bullet points in the Content section of the automation action.

      The problem isn't seen if the same content is sent without bullet points.

      Environment

      JSM, Automation for Jira

      Steps to Reproduce

      1. Create a rule with any trigger(simplest being Manual Trigger)
      2. Add Send customised email action
      3. In the Settings tab, add your email in the Recipient(s) field.
      4. In the Content tab, select Rich Text in the Content Format field.
      5. In the Content field, add 2 smart values as Bullet Points from the Automation smart values - issues page. For example: {{issue.description}} and {{customfield_xxxxx}} where the customfield_xxxxx is the one of the work item fields which is empty(doesn't have a value on the work item).
      6. Ensure that both the smart values have code-style formatting
      7. Click Next to save the rule.
      8. Ensure that the custom field is empty on the work item.
      9. Trigger the rule from the work item. The rule will fail with the error.

      Expected Results

      The rule shouldn't fail if a bullet point is empty. If showing an error message is necessary, it should be more specific ensuring the cause of the error. A warning in the audit log is better than an error.

      Actual Results

      Rule fails with the Invalid value provided for the required field: body error

      Workaround

      There can be several workarounds:

      • Switch Content Format to HTML or Plain Text
      • Add static text alongside the smart value in the same bullet point (e.g., "Description: issue.description") so that the list is not an empty node. Probably the best fix because it's clearer to get an email with "Custom field:" and then blank rather than a blank bullet point.
      • Send the same content but without listing those as bullet points

              Assignee:
              Unassigned
              Reporter:
              Diptajeet Datta
              Votes:
              1 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated: