Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

The console is a place designed to run small one-use scripts or to test your code for Post functions, Listeners, Repo, etc. With that in mind, when you run code you need to give a Issue as a context if you want to test your script in that issue’s context. To set an issue as context, just do the following:

Code Block
languagepy
issue = Issue("Your Issue Key")

Then you can access all the Issue normal capabilities such as set(field, value) and transition(target_status) .

You can test your code in the Console and then set it on Post functions or Listeners removing the issue = Issue("Your Issue Key")` section as this is issue context, after that, the code should work normally.

To log information on the console you can use the logger (without importing anything).