Uploaded image for project: 'SR for Jira - Development'
  1. SR for Jira - Development
  2. SRJIRA-4173

"Send a custom email" workflow script configuration deserialisation incorrectly assumes that FIELD_EMAIL_FORMAT will be either HTML or TEXT

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Done
    • Priority: High
    • Resolution: Done
    • Affects Version/s: 5.7.0
    • Fix Version/s: 5.7.2
    • Component/s: None
    • Labels:
      None
    • Sprint:
      SR4J Sprint 73
    • Critical Points:
      6.7

      Description

      It seems that it can also be an empty string as shown in this redacted snippet of workflow xml submitted in a support ticket by a customer:

      <function type="class">
        ...
        <arg name="FIELD_EMAIL_FORMAT"></arg>
        ...
      </function>
      

      Trying to deserialise config like this leads to:

      Script failure, check logs: Cannot deserialize value of type `com.onresolve.scriptrunner.canned.jira.workflow.postfunctions.mail.EmailFormat` from String "": not one of the values accepted for Enum class: [HTML, TEXT] at [Source: UNKNOWN; line: -1, column: -1] (through reference chain: com.onresolve.scriptrunner.canned.jira.workflow.postfunctions.SendCustomEmailCommand["FIELD_EMAIL_FORMAT"])
      Cannot deserialize value of type `com.onresolve.scriptrunner.canned.jira.workflow.postfunctions.mail.EmailFormat` from String "": not one of the values accepted for Enum class: [HTML, TEXT]

        Attachments

          Activity

            People

            Assignee:
            krana Kyran Rana [X] (Inactive)
            Reporter:
            merdmann Marcin Erdmann
            Votes:
            1 Vote for this issue
            Watchers:
            7 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: