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

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

      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

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

            Luiz Silva added a comment -

            This issue is now fixed in version 2.0.2.

            Luiz Silva added a comment - This issue is now fixed in version 2.0.2.

            For us... this problem did not appear until the 2.x release.  We had to revert to 1.11.1 to work around the duplicate custom fields.  We have many being a 12 year old Jira instance and can not easily rename people fields without breaking many dashboards and saved filters.

            David Morse added a comment - For us... this problem did not appear until the 2.x release.  We had to revert to 1.11.1 to work around the duplicate custom fields.  We have many being a 12 year old Jira instance and can not easily rename people fields without breaking many dashboards and saved filters.

              Unassigned Unassigned
              aharith Akmal Harith (Inactive)
              Affected customers:
              3 This affects my team
              Watchers:
              4 Start watching this issue

                Created:
                Updated:
                Resolved: