Uploaded image for project: 'Atlassian Product Integrations'
  1. Atlassian Product Integrations
  2. API-156

Having a duplicate custom field name breaks the Notify Slack post-function renderer and the notification

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Low
    • None
    • None
    • None
    • Severity 3 - Minor

    Description

      Issue Summary

      • Jira Slack integration throwing error when duplicate custom field names exist
      • Affecting Jira Server for Slack version 2.0.1.

      Steps to Reproduce

      1. Configure a Slack integration in Jira
      2. Create duplicate custom field with the name 'Category' ( Other duplicated custom fields are affected too)
      3. Configure the Notify Slack post-function

      Expected Results

      Renderer works fine and notifications are sent correctly.

      Actual Results

      • The notification preview in Notify Slack post-function throws the following error:
        Error rendering preview
        Duplicate key JiraPostFunctionEventRenderer.CustomFieldWrapper(field=Category, issue=com.atlassian.jira.plugins.slack.web.rest.SlackMessageResource$1@432a38d8)
        
      • The notification in Slack breaks with the error

        Error in Notify Slack configuration for project XXX. Please contact your administrator to make sure that Notify Slack post-function comes after the issue creation.

      Notes

      The plugin pre-populates values of all custom fields for message rendering, thus it is breaking the rendering with the Duplicate key error.

      Workaround

      Do not use custom fields with the same name
      OR
      Revert to the add-on's version 1.1.11 which is not affected from here

      Attachments

        Activity

          People

            Unassigned Unassigned
            aharith Akmal Harith (Inactive)
            Votes:
            3 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: