Uploaded image for project: 'SR for Jira - Development'
  1. SR for Jira - Development
  2. SRJIRA-2049

Script fragment web-item in navigation bar drop down does not trigger dialog or flag in JIRA 7.2+

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Done
    • Priority: High
    • Resolution: Fixed
    • Affects Version/s: 4.3.8
    • Fix Version/s: 4.1.3.19, 4.3.9
    • Component/s: None
    • Labels:
      None
    • Sprint:
      Sprint 26 - Ends Oct 3
    • Critical Points:
      0

      Description

      What we get is the user being taken to the REST endpoint and the flag or dialog is not rendered.

      This is because in JIRA 7.2+ <styleClass> is being ignored in the resulting html only in particular locations. ScriptRunner looks for this class and renders the dialog and flags based on this which is now broken.

      To reproduce:

      • Add raw xml module like below:
        <web-item name="AeroPlanner Button" i18n-name-key="aeroplanner-button.name" key="aeroplanner-button" section="system.top.navigation.bar" weight="1000">
        <description key="aeroplanner-button.description">Links for AeroPlanner</description>
        <label key="aeroplanner"/>
        <tooltip key="tool1">Menu item</tooltip>
        <link linkId="aeroplanner-link"/>
        </web-item>
        <web-section name="dropDown" key="drop-down" location="aeroplanner-link" weight="1000">
        <description key="drop-down.description">Drop-Down PlugIn</description>
        </web-section>
        
      • Add custom web-item to location "aeroplanner-link/drop-down" and select "run code and display a dialog".
      • Click on menu item in the aeroplanner dropdown and the dialog is not rendered.

      It looks like Atlassian changed this in JIRA 7.2+ but we should be able to workaround it by looking up by id. We load the ids on the page and JSON and get the JavaScript to read them and register the event handlers.

        Attachments

          Activity

            People

            Assignee:
            amarkham Adam Markham
            Reporter:
            amarkham Adam Markham
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: