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

Raw XML modules with sr-trigger-flag class do not open flags, they load raw json on the current page

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Triage
    • Priority: Low
    • Resolution: Unresolved
    • Affects Version/s: 5.6.1
    • Fix Version/s: None
    • Component/s: Fragments
    • Labels:
      None
    • Critical Points:
      0.6

      Description

      Steps to reproduce:

       

      1 - Create a web item like this:

      2 - click preview to see the XML, and copy it.

      3 - Create a raw XML module, copy the above web item XML into it and change it like this:

      4- create the rest endpoint that the web items talk to like this:

      import com.onresolve.scriptrunner.runner.rest.common.CustomEndpointDelegate
      import groovy.json.JsonOutput
      import groovy.transform.BaseScript
      
      import javax.ws.rs.core.MultivaluedMap
      import javax.ws.rs.core.Response
      
      @BaseScript CustomEndpointDelegate delegate
      
      approve(httpMethod: "GET") { MultivaluedMap queryParams ->
      
          // the details of getting and modifying the current issue are omitted for brevity
          // def issueId = queryParams.getFirst("issueId") as Long // use the issueId to retrieve this issue
      
          def flag = [
              type : 'success',
              title: "Issue approved",
              close: 'auto',
              body : "This issue has been approved for release"
          ]
      
          Response.ok(JsonOutput.toJson(flag)).build()
      }
      

       5 - try to use the 2 web items and you should notice that the raw XML module will not open a flag, and instead it just reloads the page with the raw JSON result

       

       

       

        Attachments

          Activity

            People

            Assignee:
            Unassigned Unassigned
            Reporter:
            mclark Matthew Clark
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated: