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

Fragments: HTML element ID not applied to "Custom web item providers" from Jira's quick tool menus

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Triage
    • Priority: L3
    • Resolution: Unresolved
    • Affects Version/s: 6.18.0
    • Fix Version/s: None
    • Component/s: Fragments
    • Labels:
      None
    • Critical Points:
      8.6

      Description

      ScriptRunner Fragments placed in any of the operations sections are only working from the Issue preview "More" menu.

      The Fragment does not work when users try to click a Fragment from the Sprint Board Issue quick menu, or "." quick menu.

      Steps to reproduce

      • Create a "Custom web item provider" in any of the operations section. E.g. operations-operations.
      • Use the example script, which creates a new task:
        • import com.atlassian.plugin.web.api.model.WebFragmentBuilder
          
          def fragments = [] 
          [1].each { 
          
              fragments << new WebFragmentBuilder(1) 
                  .id("SRJSUP-20543") 
                  .label("Create Task Test") 
                  .title("Create Task Test") 
                  .styleClass("sr-trigger-flag") 
                  .webItem("") 
                  .url("/secure/CreateIssue.jspa?pid={{PROJECT KEY}}&issuetype=1") 
                  .build() 
          } 
          
          return fragments
          
      • Navigate to any issue preview screen. Click the "More" menu, then "Create Task Test". The Fragment can be used.
        • Note: The browser will navigate to the link URL instead of opening a pop-up. This bug is covered in (SRJIRA-5302)
      • Navigate to a Sprint Board and select any issue.
      • Use:
        • The "." quick menu shortcut and search for and click the "Create Task Test" functionality.
        • The quick menu ellipsis "..." on the right hand side to click the Fragment titled "Create Task Test":

      Expected Behaviour

      The Fragment opens a dialog which creates a new Task or navigates to a URL which performs the same action.

      Actual Behaviour

      If using the "." quick menu, the dialog box gets stuck in a "Loading..." state.

      If using the Issue preview quick menu from the sprint board, nothing happens.
      See attached .har file and console logs:

      Workarounds

      1. Click the Fragment button from the Issue Preview screen.
      2. Open the browser network tab and double click on the CreateIssue.jspa call.

        Attachments

          Activity

            People

            Assignee:
            Unassigned Unassigned
            Reporter:
            jbaldwin Joe Baldwin
            Votes:
            1 Vote for this issue
            Watchers:
            5 Start watching this issue

              Dates

              Created:
              Updated: