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

XMLWordPrintable

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

              kpainter@atlassian.com Kyle Painter
              23ef3e30d63c Anusha Rutnam
              Votes:
              5 Vote for this issue
              Watchers:
              18 Start watching this issue

                Created:
                Updated:
                Resolved: