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

<script> tag causes the script registry to not load

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Done
    • High
    • Resolution: Fixed
    • 5.1.0
    • 5.3.0
    • None
    • None
    • 1.6

    Description

      If you add a script directly in JIRA and it contains the '<script>' tag, it will cause the script registry to not load.

      Steps to Reproduce:

      • Create a Scripted Field (or something else, like a REST Endpoint) directly in JIRA with a script.
      • Go to the Script Registry and click Run, nothing will show up.

      I received this error in the browser logs:

      Uncaught SyntaxError: Invalid or unexpected token
          at eval (<anonymous>)
          at http://localhost:8080/jira/s/683777f7ed2bf66bcb5bf43108ad7886-CDN/e90v89/75005/b6b48b2829824b869586ac216d119363/aa6cf545ff213915ecbf1d6cdcbaa2cc/_/download/contextbatch/js/_super/batch.js?locale=en-US:56:128
          at Function.globalEval (http://localhost:8080/jira/s/683777f7ed2bf66bcb5bf43108ad7886-CDN/e90v89/75005/b6b48b2829824b869586ac216d119363/aa6cf545ff213915ecbf1d6cdcbaa2cc/_/download/contextbatch/js/_super/batch.js?locale=en-US:56:139)
          at HTMLScriptElement.<anonymous> (http://localhost:8080/jira/s/683777f7ed2bf66bcb5bf43108ad7886-CDN/e90v89/75005/b6b48b2829824b869586ac216d119363/aa6cf545ff213915ecbf1d6cdcbaa2cc/_/download/contextbatch/js/_super/batch.js?locale=en-US:168:97)
          at Function.each (http://localhost:8080/jira/s/683777f7ed2bf66bcb5bf43108ad7886-CDN/e90v89/75005/b6b48b2829824b869586ac216d119363/aa6cf545ff213915ecbf1d6cdcbaa2cc/_/download/contextbatch/js/_super/batch.js?locale=en-US:57:35)
          at init.domManip (http://localhost:8080/jira/s/683777f7ed2bf66bcb5bf43108ad7886-CDN/e90v89/75005/b6b48b2829824b869586ac216d119363/aa6cf545ff213915ecbf1d6cdcbaa2cc/_/download/contextbatch/js/_super/batch.js?locale=en-US:167:502)
          at init.append (http://localhost:8080/jira/s/683777f7ed2bf66bcb5bf43108ad7886-CDN/e90v89/75005/b6b48b2829824b869586ac216d119363/aa6cf545ff213915ecbf1d6cdcbaa2cc/_/download/contextbatch/js/_super/batch.js?locale=en-US:162:77)
          at init.$.fn.(anonymous function) [as append] (http://localhost:8080/jira/s/3e0c75879f6a0e0ec8f3fb85c340c194-CDN/e90v89/75005/b6b48b2829824b869586ac216d119363/207562d6d1509498f23e85066b629463/_/download/contextbatch/js/atl.admin,jira.global,jira.admin,-_super/batch.js?agile_global_admin_condition=true&healthcheck-resources=true&is-server-instance=true&is-system-admin=true&jag=true&jaguser=true&locale=en-US&nps-acknowledged=true:200:1773)
          at Object.<anonymous> (http://localhost:8080/jira/s/cd3087e64adfd71a6eecced485d72560-CDN/e90v89/75005/b6b48b2829824b869586ac216d119363/5.1.7-SNAPSHOT/_/download/batch/com.onresolve.jira.groovy.groovyrunner:adminPluginResources/com.onresolve.jira.groovy.groovyrunner:adminPluginResources.js?locale=en-US:3500:5693)
          at j (http://localhost:8080/jira/s/683777f7ed2bf66bcb5bf43108ad7886-CDN/e90v89/75005/b6b48b2829824b869586ac216d119363/aa6cf545ff213915ecbf1d6cdcbaa2cc/_/download/contextbatch/js/_super/batch.js?locale=en-US:63:58)
      

      Workaround:
      You can run the scripts from a file instead of inline.

      Attachments

        Activity

          People

            jechlin Jamie Echlin
            jdavis Jenna Davis
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: