Script Console
The Script Console is a scratchpad: write JavaScript, press Run, see the result. Use it to explore the Jira REST API, try a query, or draft code before you save it as a script.
How it runs
- In your browser, with your Jira permissions. It can do nothing you couldn't do by hand.
- Nothing is saved, and nothing runs on a server. Closing the tab stops a running script.
- A script may run for up to 60 seconds.
What you can use
| Global | What it does |
|---|---|
requestJira(path, init?) |
Calls the Jira REST API, e.g. requestJira('/rest/api/3/myself') |
router.navigate(path), router.open(url) |
Go to a page in Jira, or open one in a new tab |
showFlag({ id, title, description, type }) |
Show a Jira flag |
console.log(...) |
Print to the output under the editor |
await works at the top level, and whatever you return is shown as the result. The editor autocompletes these globals, and the same code works in a fragment.
Shortcuts
- ⌘↵ / Ctrl+↵: run