Frequently Asked Questions
Who can use PyRunner?
Jira administrators. Every page in the app is gated on the Jira administrator permission, so nobody else can open it or run a script.
Do I need to know Python?
Not to get started. Every feature ships with a gallery of working examples you can pick, run, and edit, and the editor knows your Jira site well enough to complete field names and method calls as you type. You'll want the basics of Python to go beyond the examples, but nothing advanced.
Can I use pandas, or install other libraries?
pandas and numpy are already loaded as pd and np, so you can use them without importing anything. A good part of the standard library imports normally too. You can't install packages, because scripts have no network access. If something you need is missing, email us at support@pallas-apps.com and we'll look at adding it. Libraries has the full picture.
What happens if my script fails halfway through updating Jira?
Nothing is changed. Updates are held back while the script runs and only sent to Jira once it finishes, so a script that fails partway through leaves your data untouched. When updates do go through, each one is listed individually on the Output tab.
Why did my script keep running in the background?
A script in the Script Console has 22 seconds before it carries on in the background and finishes there. That's why a long run pauses before showing its result. It hasn't failed, and you don't need to do anything. Limitations lists the limit for each place a script can run.
Can a script run as someone other than me?
Only as PyRunner, the app's own account. A script runs either as PyRunner or as the account that saved it, and it can't be made to act as a colleague.
Why is my scripted field empty on existing work items?
A scripted field calculates when a work item changes, so an item that hasn't been touched since you created the field won't have a value yet. There's no way to calculate one across a whole site at once, which is a Jira Cloud constraint rather than a choice. Scripted field limitations explains what this means in practice.
Can I test a script without changing anything in Jira?
There's no preview mode, so the reliable way is to write the script read-only first. Print the changes you intend to make and check the list, then add the lines that update Jira once it looks right. Narrowing the query to a single work item while you're building is worth doing too.
How long are run logs and output kept?
About seven days, or until the space set aside for them runs out, whichever comes first. A site running scripts every few minutes will keep less than a week.
How many work items can one script handle?
A single search returns up to 25,000 work items with up to 100 fields each. The real limit is usually time rather than volume, since everything has to finish inside the run's time limit.
Troubleshooting
Using the Logs Page
The Logs page is the first place to look when something didn't happen. It records every script that ran on your site, whoever or whatever started it.
| Column | What it tells you |
|---|---|
| Time | When the run started |
| Created by | Who set up the job, listener, or rule |
| Source | What triggered it, and which job or listener it belongs to |
| Ran as | The identity the script used against Jira |
| Result | What it returned, or the error if it failed |
| Changes | What it wrote, expandable when there's more than a few |
| Duration | How long it took |
Created by and Ran as are different things and often differ. A job you set up but which runs as PyRunner shows your name in one column and PyRunner in the other.
Switch between All and Failed to narrow the list to runs that went wrong, and use Refresh to pull in anything that has happened since you opened the page. Arriving here from a job or listener filters to that one automatically, and clearing the filter shows everything again.
View output opens whatever the script printed. Output is kept for about seven days, after which the row remains but the output is gone.
Note: Two things never appear here. Behaviours run in the browser, so they don't produce a row on this page. A behaviour that logs keeps its lines on the behaviour itself, read from View logs on its row. Workflow Restrict transition and Validate details rules are evaluated by Jira itself, so only Perform actions rules produce a row.
Script Errors
A failed run shows its error in the Result column, and the editor marks the line the script stopped on. Most errors fall into a handful of shapes.
| What you see | What it usually means |
|---|---|
AttributeError on None | A field that isn't set on this work item, so reading it gave nothing back. Check for empty before using the value |
| A field reads as nothing, with no error | The name doesn't match a field on this site. An unrecognised name reads as empty rather than failing, so check it with Field Lookup |
Field name '…' is ambiguous | Two fields share that name. Read it by id instead |
Field '…' cannot be set | The field isn't on the screen for that work item's space, or that space uses a differently named one |
no Jira user matches '…' | The email or account id doesn't belong to anyone on the site |
import of '…' is not allowed | The module isn't available to scripts |
file access is blocked in scripts | Something tried to read or write a file, which the sandbox doesn't allow |
| A permission error from Jira | The identity the script ran as can't see or change that work item. Check Run as |
One thing worth knowing about updates. Field changes to the same work item are sent together, so a single bad value fails the whole set. If a run reports several field changes failing at once, look for the one value that Jira rejected rather than assuming all of them were wrong. Limitations covers what the sandbox blocks.
A Script Did Not Run
Nothing in the Logs page means the script was never started, which is a different problem from one that failed. Work back through the reasons it wouldn't have been triggered.
Listeners. Check the listener is enabled, that the event you expect is one of the events it subscribes to, and that the work item's space is in Spaces. A listener also won't re-trigger on changes its own script made, which is deliberate and stops a script looping on itself. Jira can take a few minutes to deliver an event, so give it a moment before concluding it didn't fire.
Scheduled jobs. Check the job is enabled and look at Next run, which tells you how the schedule was actually interpreted. If that time isn't what you expected, the site timezone is the usual reason. Run now is a quick way to confirm the script itself works.
Scripted fields. Values calculate when a work item changes, so an untouched work item won't have one. Edit it and the value appears.
Workflows. Check the rule is enabled and sitting on the transition you think it is. Only Perform actions rules reach the Logs page, so a Restrict or Validate rule leaving no row there is normal. The Health column on the Workflows page is where those two report trouble.
App Not Loading
If PyRunner is stuck on a loading spinner and never shows anything, it's usually because the permissions between your Atlassian account and the app have got into a bad state. Resetting them clears it.
Go to id.atlassian.com/manage-profile/apps, find PyRunner in the list, and choose Remove access, confirming when you're asked. Then go back to PyRunner in Jira. You'll be prompted to allow access again, so click Allow and then Accept. The app should load normally, and a refresh will settle it if it doesn't.
Still Need Help?
Our support team is here to assist you with any issues you're experiencing.