Uploaded image for project: 'Jira Platform Cloud'
  1. Jira Platform Cloud
  2. JRACLOUD-79586

Creating a custom field with a duplicate name will break saved filters

      Issue Summary

      Currently, creating a custom field that uses the same name as an existing field will break any saved filters that reference the original field by name.

      Steps to Reproduce

      1. Create a saved filter that references an existing custom field by name e.g
        "Duplicate Name" = A

        Check to see that this filter returns issues successfully:

      2. Create a second custom field that uses the exact same name as the custom field from step 1
      3. Go back to the filter in step 1 and observe that it now broken with the error "The operator '=' is not supported by the 'Duplicate Name' field.":

        Fixing the JQL requires changing the query to
        "Duplicate Name[Dropdown]" = A

        This kind of fix may not be scalable.

      Expected Results

      Any breaking changes resulting from creating or deleting a custom field should be flagged in the UI.

      Actual Results

      There is no indication that creating or deleting a custom field will result in broken filters.

      Workaround

      You can delete and rename the newer of the two custom fields.

      Conversely, you can make sure that the filter's JQL refers to a custom filter by its ID rather than its name. If you do this, the saved filter will not be broken if you change the custom field's name or if a new field with the same name is subsequently created.

      To find all your custom fields' IDs, go to https://<your site name>.atlassian.net/rest/api/3/field

      In the following example the id of my custom field is 10098:

      To use it in a filter's JQL you need to type cf[10098]

      After changing the custom field's name, the saved filter referring to the field's ID continued to work:

      Whereas the custom field that referred to the field name has broken:

        1. Duplicate field name validation 1.png
          Duplicate field name validation 1.png
          288 kB
        2. Duplicate field name validation 2.png
          Duplicate field name validation 2.png
          305 kB
        3. image-2022-08-02-15-47-40-965.png
          image-2022-08-02-15-47-40-965.png
          264 kB
        4. image-2022-08-02-15-48-23-724.png
          image-2022-08-02-15-48-23-724.png
          55 kB
        5. screenshot-1.png
          screenshot-1.png
          99 kB
        6. screenshot-2.png
          screenshot-2.png
          3 kB
        7. screenshot-3.png
          screenshot-3.png
          149 kB

            [JRACLOUD-79586] Creating a custom field with a duplicate name will break saved filters

            As a mitigation for this issue we've introduced new validation which will allow the user to identify when a query fails due to duplicated field names, and suggests alternate terms to correct their query.

            The user can update their filter with the suggested JQL term to resolve the error and prevent and future validation errors due to duplicate field names.

            Thank you all for your patience.

            Kind regards,
            Kyle

            Kyle Painter added a comment - As a mitigation for this issue we've introduced new validation which will allow the user to identify when a query fails due to duplicated field names, and suggests alternate terms to correct their query. The user can update their filter with the suggested JQL term to resolve the error and prevent and future validation errors due to duplicate field names. Thank you all for your patience. Kind regards, Kyle

            It seems like you develop serious bugs and refuse to fix them.

            I don't understand this behavior.

            Itamar Ben Sinai added a comment - It seems like you develop serious bugs and refuse to fix them. I don't understand this behavior.

            Romeo Bollen added a comment - - edited

            This also affects team managed projects. We have third party add-ons with custom fields.
            The name of this custom field has been in use with the company for many years. Recently we added a new project type.

            A "Team managed business project".
            This new project added a Jira default field with the same name as the existing third party add-on with-out warning.

            No manual created custom fields were added. It still broke our existing filters. What is even worse I cannot remove the newer field since it is a default field.

            Romeo Bollen added a comment - - edited This also affects team managed projects. We have third party add-ons with custom fields. The name of this custom field has been in use with the company for many years. Recently we added a new project type. A "Team managed business project". This new project added a Jira default field with the same name as the existing third party add-on with-out warning. No manual created custom fields were added. It still broke our existing filters. What is even worse I cannot remove the newer field since it is a default field.

            This symptom appears to be for a company-managed project, rather than a team-managed project.  Is that correct?

            If so, why would the site admin knowingly create two custom fields with the same name?  (Better still, why does Jira Cloud even allow this?)

            William Sheboy added a comment - This symptom appears to be for a company-managed project, rather than a team-managed project.  Is that correct? If so, why would the site admin knowingly create two custom fields with the same name?  (Better still, why does Jira Cloud even allow this?)

              kpainter@atlassian.com Kyle Painter
              23ef3e30d63c Anusha Rutnam
              Affected customers:
              5 This affects my team
              Watchers:
              19 Start watching this issue

                Created:
                Updated:
                Resolved: