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

Improve Listener stack traces

    Details

    • Type: New Feature
    • Status: Triage
    • Priority: Low
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: Listeners
    • Labels:
      None
    • Critical Points:
      2.2

      Description

      As a ScriptRunner user

      I want to be able to find the Listener script name in the stack trace / error

      so that I can quickly find the Listener script that is causing an error.

       

      Customers will be able to find the problem with their Listener script quicker if we printed the Listener name in the stack trace. 

      Example:

      In the example Listener error below, we can see that the Listener is failing on an 'IssueEvent' because a value named 'label' has a null value on line 59 of the script.

      This is useful if you have a handful of Listeners, but not when you have 100's of Listeners configured as it's a manual task to scan all Listener scripts that use the AbstractScriptListener in this case. 

      2020-10-05 05:08:36,501-0700 https-jsse-nio-8443-exec-245 ERROR ashimkovich 308x675798x1 1nu8hc6 10.200.10.28 /rest/greenhopper/1.0/rank [c.o.scriptrunner.runner.AbstractScriptListener] *************************************************************************************
      2020-10-05 05:08:36,501-0700 https-jsse-nio-8443-exec-245 ERROR ashimkovich 308x675798x1 1nu8hc6 10.200.10.28 /rest/greenhopper/1.0/rank [c.o.scriptrunner.runner.AbstractScriptListener] Script function failed on event: com.atlassian.jira.
      event.issue.IssueEvent, file: <inline script>
      com.atlassian.jira.util.dbc.Assertions$NullArgumentException: label should not be null!
      at com.atlassian.jira.util.dbc.Assertions.notNull(Assertions.java:25)
      at com.atlassian.jira.issue.label.Label.<init>(Label.java:26)
      at Script8.run(Script8.groovy:59)
      

        Attachments

          Activity

            People

            Assignee:
            Unassigned
            Reporter:
            jbaldwin Joe Baldwin
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Dates

              Created:
              Updated: