Uploaded image for project: 'Jira Data Center'
  1. Jira Data Center
  2. JRASERVER-78160

Editing a custom field's configuration context fails if its field configuration scheme ID and field configuration ID are not identical

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: Low Low
    • 9.9.1
    • 9.7.1
    • None

      Issue Summary

      When a custom field's configuration context is edited, the operation fails if the field configuration scheme ID and field configuration ID are not identical.

      This is reproducible on Data Center: yes

      Steps to Reproduce

      1. Set up a new instance of Jira.
      2. Run the following SQL command on the Jira database to desynchronise the field configuration scheme and field configuration IDs:
        UPDATE sequence_value_item SET seq_id = seq_id+100 WHERE seq_name = 'FieldConfiguration';
        
      3. Restart Jira.
      4. Navigate to Administration (⚙) > Issues > Custom Fields.
      5. Create a new Select List (single choice) custom field named Test Custom Field, and apply it to all projects.
      6. Run the following read-only SQL query and observe the results:
        SELECT * FROM fieldconfigschemeissuetype ORDER BY id DESC LIMIT 1;
        
        • The results should be similar to the example results below. Note that the fieldconfigscheme and fieldconfiguration IDs are different:
            id   | issuetype | fieldconfigscheme | fieldconfiguration 
          -------+-----------+-------------------+--------------------
           10600 |           |             10500 |              10600
          (1 row)
          
      7. Select ... > Configure for the newly created Test Custom Field, then select Edit Configuration.
      8. Change Add projects to this context from All projects in Jira (global context) to Selected projects, and drag a project from Available projects to Selected projects.
      9. Select Save and generate a HAR file by following the steps in our knowledge base article Generating HAR files and analyzing web requests.

      Expected Results

      The configuration change should succeed.

      Actual Results

      The configuration change fails with a HTTP 500 error.

      Reviewing the HAR file shows that the parameters sent with the POST call to /secure/admin/ManageConfigurationScheme.jspa have the same value for fieldConfigSchemeId and fieldConfigIds, which means the wrong value was sent for fieldConfigIds:

                  "params": [
      [...]
                    {
                      "name": "fieldConfigSchemeId",
                      "value": "10500"
                    },
                    {
                      "name": "fieldConfigIds",
                      "value": "10500"
                    },
      

      Note that if a field configuration belonging to another custom field matches the incorrect ID in fieldConfigIds above, Jira will mix up the two fields. This may cause the wrong options to be displayed when subsequently configuring the field, and may also cause the wrong field to appear in workflow screens.

      Workaround

      Currently there is no known workaround for this behaviour. A workaround will be added here when available.

      Other Notes

      This issue is similar to the following previous issues (but in this case, a different part of Jira's functionality is affected):

              Unassigned Unassigned
              8379abf86dad Marcus Fong
              Votes:
              2 Vote for this issue
              Watchers:
              4 Start watching this issue

                Created:
                Updated:
                Resolved: