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

Preview button is not working for Post-Functions and the Update Button fails for some Post functions

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Done
    • Priority: Critical
    • Resolution: Fixed
    • Affects Version/s: 5.5.6
    • Fix Version/s: 5.5.9
    • Component/s: Workflow Functions
    • Labels:
      None
    • Sprint:
      Sprint 54
    • Critical Points:
      15.7

      Description

      Users who try to click the "Preview" button when developing their Post Functions will get the following error in the browser console logs and the preview does not work.

      Removed some of the error for brevity

      Uncaught TypeError: Cannot read property 'toLowerCase' of null
          at Object.previewBuiltin (com.onresolve.jira.groovy.groovyrunner:combinedAdminSection.js:4)
          at handlePreview
      ......
      

      And for the "Send a custom email" post functions that are already present, if the user clicks the Update button they will get as 500 error in the browser console log:

      POST http://localhost:8080/rest/scriptrunner/latest/canned/com.onresolve.scriptrunner.canned.jira.workflow.postfunctions.SendCustomEmail/validate 500
      
      POST "http://localhost:8080/rest/scriptrunner/latest/canned/com.onresolve.scriptrunner.canned.jira.workflow.postfunctions.SendCustomEmail/validate".
      

      The 500 error also produces this response JSON:

      {"errorMessages":[],"flushedErrorMessages":[],"scriptRunResult":null,"errors":{"events":"You must provide at least one event."}}
      

      Steps to reproduce:

      1- Create a Post function

      2- Try to preview

      3- Create a "Send a custom email" post function and save it

      4- Publish the workflow

      5- Try to then edit the "Send a custom email" Post function

       

        Attachments

          Activity

            People

            Assignee:
            tbatagiannis Thanos Batagiannis
            Reporter:
            mclark Matthew Clark
            Votes:
            5 Vote for this issue
            Watchers:
            22 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: