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

Send a custom email listener doesn't work for non-issue events

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Done
    • High
    • Resolution: Done
    • 4.1.3.19, 5.3.5, 5.4.0
    • 5.5.2
    • None
    • None
    • Sprint 44, Sprint 45, Sprint 46, Sprint 47, Sprint 48, Sprint 49
    • 2.1

    Description

      When sending an email when new version is added to specific project or when a new issue link is created.

      Under "Send a custom email" listener we set our project, email addresses of recipients and VersionCreateEvent or IssueLinkCreatedEvent as Event.

      This configuration simply doesn't work. 

      Time (on server): Wed Feb 14 2018 15:23:32 GMT+0100 (Central European Standard Time)The following log information was produced by this execution. Use statements like:log.info("...") to record logging information.2018-02-14 15:23:32,272 ERROR [runner.AbstractScriptListener]: *************************************************************************************
      
      2018-02-14 15:23:32,275 ERROR [runner.AbstractScriptListener]: Script function failed on event: com.atlassian.jira.event.project.VersionCreateEvent, script: com.onresolve.scriptrunner.canned.jira.workflow.postfunctions.SendCustomEmail
      java.lang.IllegalArgumentException: 
      The issue object was not available in the binding, perhaps called from an event handler with a non-issue event
      at com.onresolve.scriptrunner.canned.jira.workflow.postfunctions.SendCustomEmail.doScript(SendCustomEmail.groovy:548)Cancel

       

      We should either remove this event from the possible events to be selected, document this use case better, or add support for events without issues in the binding.

      Attachments

        Issue Links

          Activity

            People

              tbatagiannis Thanos Batagiannis
              dyelamos Daniel Yelamos [X] (Inactive)
              Votes:
              6 Vote for this issue
              Watchers:
              12 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: