Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

How to append ScriptRunner console output to a file?

Eric Monfette October 29, 2019

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

Suggest an answer

Log in or Sign up to answer
0 votes
Answer accepted
PD Sheehan
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
October 31, 2019

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. 

TAGS
atlassian, jira product discovery learning path, product discovery training, idea prioritization, align stakeholders, discovery to delivery, product collaboration, atlassian learning, dev process, roadmap planning, insight capture, team alignment

Elevate Your Skills with Jira Product Discovery!

Unlock your potential and learn how to use Jira Product Discovery to your advantage. You’ll have the expertise to revolutionize ideas and insights, roadmapping, engage and align teams and stakeholders, and deliver the best solutions—faster. Enroll today!

Start Learning
AUG Leaders

Atlassian Community Events