Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,364,763
Community Members
 
Community Events
168
Community Groups

How to append ScriptRunner console output to a file?

Trying to run multiple JQL queries inside of the ScriptRunner console, then write the output to a local file. Getting directory errors but path is correct. Ex:

File file = new File("Documents/script_output/sr_output.txt")

file.write "output"

1 answer

1 accepted

0 votes
Answer accepted

The starting point for relative paths is your jira install/bin directory.

You can confirm by running this in the console:

def currentDir = new File(".").getAbsolutePath()

So if you want to output somewhere else, you should start from the root/drive. 

Suggest an answer

Log in or Sign up to answer
TAGS

Atlassian Community Events