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

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

    XMLWordPrintable

Details

    Description

      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:

      Attachments

        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

        Issue Links

          Activity

            People

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

              Dates

                Created:
                Updated:
                Resolved: