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

QuickCreate/Edit dialog incorrectly shows "Some issue types are unavailable..." warning

    XMLWordPrintable

Details

    Description

      NOTE: This bug report is for JIRA Cloud. Using JIRA Server? See the corresponding bug report.

      Summary

      The Create Issue (AJAX) dialog incorrectly shows Some issue types are unavailable due to incompatible field configuration and/or workflow associations.

      Steps to Reproduce

      Method 1

      1. Navigate to jira.atlassian.com
      2. Click on the Create button to create an issue.

      Method 2

      1. Download and restore reproducible.zip;
      2. Access it using the following credentials:
        username: matheus
        password: matheus
        
      3. Click on the Create button to create an issue.
      4. If the above doesn't reproduce the behavior:
        1. type DEMO-1 in the search field;
        2. Click on 'Edit' on the issue;
        3. Close the Edit issue dialog;
        4. Open the 'Create' dialog again.

      Expected Results

      The create issue AJAX dialog would show all projects and issue types available without any warnings.

      Actual Results

      The create issue AJAX dialog does show all projects and issue types available, but shows the following message:

      Some issue types are unavailable due to incompatible field configuration and/or workflow associations

      This can be seen in the attached video: behavior.mp4

      Original Description

      To reproduce:

      • Setup your JIRA instance so that you have a project/issuetype/workflow combination that shows this warning when you edit an issue (for the issue type field)
      • Edit an issue so that this warning is shown (using the quick edit dialog)
      • Then try to create a new issue. The warning will be shown in the quick create dialog
      • Right click on create issue and open it in a new tab. The warning will not be shown which is the correct behavior.

      The full warning is: "Some issue types are unavailable due to incompatible field configuration and/or workflow associations."

      The root cause is in the FieldHtmlFactoryImpl class. It has a mutable static final Map of DISPLAY_PARAMS that's passed into both the getCreateHtml() and getEditHtml() field methods. If any of the fields modify this map and set certain params (such as "restrictedSelection") then these params will be passed to any subsequent calls as well until the server is restarted so that this map is restored to its inital state!

      We should probably make this map immutable and create mutable copies everytime we call getEditHtml()/getCreateHtml(). Now if only I knew the idiot who wrote this code ...

      Attachments

        1. behavior.mp4
          3.97 MB
        2. cloud issue .mov
          6.33 MB
        3. reproducible.zip
          46 kB

        Issue Links

          Activity

            People

              Unassigned Unassigned
              andreask@atlassian.com Andreas Knecht (Inactive)
              Votes:
              68 Vote for this issue
              Watchers:
              99 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: