Issue key in panel title shifts to panel body after editing in Visual Mode

XMLWordPrintable

    • 10.03
    • 1
    • Severity 3 - Minor
    • 1

      Issue Summary

      When an issue key (e.g., PROJ-1) is used in the title parameter of a panel macro, editing the content in Visual Mode causes the issue key to be moved from the title into the body of the panel upon re-editing. The bug affects panels in comments and panels in Dashboard Rich Text gadgets.

      Why does the problem happen:
      The text editor automatically converts plain text issue keys (e.g., PROJ-1) into HTML links. The panel:title=... macro expects a plain string. When the Visual Editor renders the title, it wraps the issue key in a link tag. Upon clicking 'Edit' or 'Save', the editor's 'down-converter' (which turns Visual content back into Wiki Markup) fails to realise the link belongs inside the title parameter. It terminates the macro parameter early and places the 'orphaned' link content into the body of the panel.

      Steps to Reproduce

      1. Create a new comment.
      2. In Visual Mode, add a panel and use an issue key in the title (e.g., PROJ-1).
      3. Save the comment.
      4. Edit the comment in Visual Mode, modify the panel body (not the title with the issue key) and save the changes.

      Expected Results

      The panel has the same layout and title before and after editing the panel's body.

      The underlying markup should look like:

      {panel:title=PROJ-1}
      Some text. Edited.
      {panel}

      Actual Results

      The issue key is moved from the panel title to the panel body. The panel has no title anymore.

      The underlying markup is broken and looks like:

      {panel}
      PROJ-1
      Some text. Edited.
      {panel}

      Workaround

      Workaround 1 - Using a table instead of a panel
      It looks very similar, preserves automatic conversion of plain text issue keys into HTML links, and works in Visual mode. The table is available under the same '+' menu as the panel.

      Workaround 2 - Using a panel without a title
      It looks very similar, preserves automatic conversion of plain text issue keys into HTML links, and works in Visual mode. It requires removing the panel title text and adding the issue key to the panel body. The issue key and other text can be separated by the 'Horizontal ruler' (a horizontal line), which is available in the same '+' menu as the panel.

      Workaround 3 - Using Text mode
      Instead of editing fields containing panels in Visual mode, switch to Text mode (there are 'Visual' and 'Text' buttons at the bottom of the text editor window). Using the Text mode will prevent the editor's 'down-converter' from being used and the panel will be saved in a proper form.

      Workaround 4 - Disabling automatic conversion of plain text issue keys into HTML links
      The problem is triggered by the automatic conversion of plain text issue keys into HTML links. This automatic conversion can be disabled by disabling the ‘jiraissuelinkrenderer' module from the ‘Renderer Component Factories Plugin' system plugin. This change will prevent the Jira application from automatically converting issue keys into issue links in text fields. This module can’t be disabled from the UI. It needs to be disabled through the database and all of the Jira nodes will need to be restarted (a rolling restart is sufficient) to apply the change. The whole solution is provided in our 'How to disable Jira Issue Key being converted to Issue Link when used in comments/descriptions’ article.

      Versions Tested

      The bug was tested and confirmed on the following Jira versions:

      Testing Requirements Version Affected Version
      Customers Reported Version 11.3.10 Yes
      Most Recent Bug-Fix Release 11.3.10 Yes
      Previous Major Release 11.2.1 Yes
      Most Recent LTS 11.3.10 Yes
      Previous Supported LTS 10.3.24 Yes

        1. 1. New comment with a panel.png
          89 kB
          Mateusz T
        2. 2. New comment - Visual mode.png
          146 kB
          Mateusz T
        3. 3. New comment - Text mode.png
          152 kB
          Mateusz T
        4. 4. Edited comment with a panel.png
          92 kB
          Mateusz T
        5. 5. Edited comment - Visual mode.png
          158 kB
          Mateusz T
        6. 6. Edited comment - Text mode.png
          163 kB
          Mateusz T

              Assignee:
              Unassigned
              Reporter:
              Mateusz T
              Votes:
              1 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated: