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

Show a web panel doesn't work for location atl.gh.issue.details.tab

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Triage
    • Priority: Low
    • Resolution: Unresolved
    • Affects Version/s: 6.16.0, 6.18.0
    • Fix Version/s: None
    • Component/s: Fragments
    • Labels:
      None
    • Critical Points:
      0.7

      Description

      Configure a Show Web Panel with this library link to display a warning message on the issue details screen if the issue is unassigned but the web panel doesn't show for location atl.gh.issue.details.tab

      Steps to Reproduce

      1. Follow this library link to configure a ScriptRunner Show Web Panel
      2. Location: atl.gh.issue.details.tab
      3. Condition: !issue.assignee

      Expected Behaviour

      It should display the web panel on the issue details screen when the condition is true.

      Actual Behaviour

      The web panel doesn't show in the issue details screen when the condition is true.

      Workaround

      Preview the Show Web Panel, copy the XML script:

      <web-panel key='unassigned' name='ScriptRunner generated web panel - unassigned' location='atl.gh.issue.details.tab' class='script:writer.write ("""&#10;    &lt;div class="aui-message aui-message-error error shadowed" style="color: black;"&gt;&#10;        &lt;p class="title"&gt;Warning!&lt;/p&gt;&#10;        &lt;p&gt;This issue is not assigned to anyone.&lt;/p&gt;&#10;    &lt;/div&gt;&#10;""")'>
        <label>Unassigned</label>
        <condition class='script:!issue.assignee&#10;'>
          <param name='£trackingParameters' value='{"scriptName":"com.onresolve.scriptrunner.canned.jira.fragments.CustomWebPanel","hashedKey":"bad097494597a4e092c1524102eeaea7","location":"atl.gh.issue.details.tab"}' />
          <param name='£fragmentParameters' value='{"id":"5bef21b1-3266-4bed-be9a-125f5cc2e19f"}' />
        </condition>
        <param name='lazy' value='true' />
      </web-panel>
      

      adding the line below into the XML script:

      <resource type="download" name="icon.png" location="" />

       

      Then, create a Raw XML Module with the copied XML:

      <web-panel key='test' location='atl.gh.issue.details.tab' class='script:writer.write ("""&#10;    &lt;div class="aui-message aui-message-error error shadowed" style="color: black;"&gt;&#10;        &lt;p class="title"&gt;Warning!&lt;/p&gt;&#10;        &lt;p&gt;This issue is not assigned to anyone.&lt;/p&gt;&#10;    &lt;/div&gt;&#10;""")'>
        <label>test</label>
        <condition class='script:!issue.assignee&#10;'>
        <param name='£trackingParameters' value='{"scriptName":"com.onresolve.scriptrunner.canned.jira.fragments.CustomWebPanel","hashedKey":"bad097494597a4e092c1524102eeaea7","location":"atl.gh.issue.details.tab"}' />
          <param name='£fragmentParameters' value='{"id":"5bef21b1-3266-4bed-be9a-125f5cc2e19f"}' />
        </condition>
        <param name='lazy' value='true' />
        <resource type="download" name="icon.png" location="" />
      </web-panel>
      

      Additional Info

      • Tested in Jira 8.13.1 and Jira 8.5.4, Scriptrunner 6.16.0 and 6.18.0.
      • Attached a screenshot of the result when using the Raw XML Module.

        Attachments

          Activity

            People

            Assignee:
            Unassigned Unassigned
            Reporter:
            jpang JJ Pang
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated: