Projects with underscore in project key are broken/redirect removes the underscore of the issue key, sidebar fails to load

XMLWordPrintable

    • Type: Bug
    • Resolution: Done
    • Priority: High
    • 9.4.0, 9.5.0
    • Affects Version/s: 9.2.0, 9.3.0
    • Component/s: Issue - Others
    • 9.02
    • 8
    • Severity 2 - Major
    • 42

      Issue Summary

      Projects with underscore in project key are broken/redirect removes the underscore of the issue key, sidebar fails to load
      This is reproducible on Data Center: yes

      Note: The issue is not reproducible on 9.1.0

      Steps to Reproduce

      1. Install Jira 8.13.x
      2. Go to Administration > System > Click the Advanced Settings button on the 'General Configuration' page.
      3. Edit “jira.projectkey.pattern" with value: ([A-Z][A-Z0-9_]+) - to allow project keys with underscore
      4. Create a Project with underscore on the project key. Eg: Basic Project, B_P
      5. Create a few issues on this project: B_P-1, B_P-2
      6. Upgrade to Jira 9.2.0
      7. On the System Dashboard, click on a link for issues from the test project. Eg: On Assign to me gadget click on B_P-1
        Sidebar fails to load:
      8. The issue will open but the Project left panel won’t load. An error is displayed
      9. After a refresh we see “You can’t view this issue” 
      10. The URL is wrong, underscore is missing on project key
      11. If you Navigate to Projects > Basic Project and open B_P-1, it works fine

      Expected Results

      When using a link to access the issue it should load without error. Underscore should not be removed from project key and the issue should open on the page refresh.

      Actual Results

      An error when trying to open the issue using a link, and a redirect removing underscore from the URL.
      Sidebar will fail to load, also the following error might display:
      "We couldn't load the project sidebar. Refresh the page to try again"

      On refreshing the page, the URL of the issue on which it was originally accessed from will change to remove the 'underscore' character, and it will show "You can't view this issue" page, which could be seen from the .har file

      Console output will log:

      batch.js?baseurl-check-resources=true&healthcheck-resources=true&jira.create.linked.issue=true&locale=en-US&richediton=true:584 *Error while rendering sidebar.* Message: \{readyState: 4, getResponseHeader: ƒ, getAllResponseHeaders: ƒ, setRequestHeader: ƒ, overrideMimeType: ƒ, …}
      

      Workaround

      Access the issues from inside the Project view.

        1. image-2022-09-27-12-09-09-301.png
          362 kB
          Mikaela Teixeira
        2. image-2022-09-27-12-10-20-979.png
          345 kB
          Mikaela Teixeira
        3. image-2022-09-27-12-10-59-391.png
          137 kB
          Mikaela Teixeira
        4. image-2022-09-27-12-12-09-636.png
          156 kB
          Mikaela Teixeira
        5. image-2022-09-27-12-16-13-946.png
          298 kB
          Mikaela Teixeira
        6. image-2022-11-29-12-30-43-543.png
          17 kB
          Sergey

            Assignee:
            Shruti Holennavar (Inactive)
            Reporter:
            Mikaela Teixeira
            Votes:
            7 Vote for this issue
            Watchers:
            23 Start watching this issue

              Created:
              Updated:
              Resolved: