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

NullPointerException when JQL function is unavailable

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Done
    • L3
    • Resolution: Done
    • None
    • 6.3.0
    • None
    • None
    • 1.8

    Description

      Starting from ScriptRunner 6.0.2-p5, when a Scripted JQL function is not available (for example, the App module is disabled), instead of returning a blank result, a java.lang.NullPointerException is raised.

      This exception usually causes the page being browsed to fail, the JQL not executing, and usually showing an error message to the user. This error message can sometimes block the page from loading at all.

      Stacktrace:
      com.atlassian.jira.issue.search.SearchException: java.lang.NullPointerException: Cannot get property 'functionName' on null object

      Caused by: java.lang.NullPointerException: Cannot get property 'functionName' on null object at org.codehaus.groovy.runtime.NullObject.getProperty(NullObject.java:60) at org.codehaus.groovy.runtime.InvokerHelper.getProperty(InvokerHelper.java:190) at org.codehaus.groovy.runtime.callsite.NullCallSite.getProperty(NullCallSite.java:46) at org.codehaus.groovy.runtime.callsite.GetEffectivePogoPropertySite.callGetProperty(GetEffectivePogoPropertySite.java:45) at com.onresolve.jira.groovy.jql.ScriptedFunctionClauseFactory.getQuery(ScriptedFunctionClauseFactory.groovy:79) at com.atlassian.jira.jql.query.ContextAwareQueryVisitor.visit(ContextAwareQueryVisitor.java:98)

      How to reproduce
      1. Save a filter with a Scripted JQL Function, for example issueFunction in linkedissuesofAllRecursive("", "is Epic of")
      2. Link something to that filter (agile board, Portfolio Issue Source)
      3. Disable the JQL module (EG linkedissuesofAllRecursive) via UPM
      4. Access that resource in Jira (Agile board, Portfolio).

      Attachments

        Activity

          People

            jechlin Jamie Echlin
            rlander Reece Lander
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: