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

Syntax check in Script Registry shows mangled script and errors

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Done
    • Major
    • Resolution: Fixed
    • 4.2.0.5
    • 5.3.0
    • None
    • JIRA 7.0.10

    • 0

    Description

      I'm performing a test upgrade of an old JIRA instance to 7.0 and going through all Groovy scripts in the process.

      The Script Registry worked nicely for finding scripts with problems, but there are some workflow scripts that:

      • are correct (when edited from JIRA's workflow editor for conditions or post-functions)
      • are shown mangled in the Script Registry
      • (probably bc. of the mangled code) are shown as having errors in the Script Registry

      For instance: the following code line:
      text = "<tr><td>EO</td><td>$userName</td><td>am $now</td></tr>\n"
      is shown as the following in the script registry (but not in the actual workflow):
      text = "EO$userNameam $now\n"
      with the error message:
      [Static type checking] - The variable [userNameam] is undeclared.

      It looks like there is some HTML stripping going on (instead of only escaping it for including it in the textarea), and like the syntax checks happen after the code is already stripped.

      Attachments

        Activity

          People

            jechlin Jamie Echlin
            hobel Ulrich Hobelmann
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: