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

Error when attempting to test your add-comment-on-transition script in the script runner

    XMLWordPrintableJSON

    Details

    • Type: Change
    • Status: Done
    • Priority: Blocker
    • Resolution: Support Request
    • Affects Version/s: 1.7.13
    • Fix Version/s: None
    • Component/s: None
    • Environment:

      JIRA 4.3.4 running on MS Server 2008

    • Critical Points:
      0

      Description

      Attempting to run the script you very kindly sent me here from out discussion on Atlassian Answers here

      Am getting an error generated. I am pasting in the following to the script runner window having ticked the radio button for Groovy:

      import com.atlassian.jira.ComponentManager
      import com.atlassian.jira.issue.comments.CommentManager
      
      ComponentManager componentManager = ComponentManager.getInstance()
      CommentManager commentManager = componentManager.getCommentManager()
      
      commentManager.create(issue, transientVars.context.caller, "Comment automatically generated...", false)

      ...and this is generating the following error:
      javax.script.ScriptException: groovy.lang.MissingPropertyException: No such property: issue for class: Script1

      I'll paste the stack trace in the comments.

      All the best,

      D

        Attachments

          Activity

            People

            Assignee:
            jechlin Jamie Echlin
            Reporter:
            daveschrader David Donnelly
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: