JIRA - Create Isue and the store IssueID

Antonio D'Errico March 14, 2016

Hello,

i want to export the issueid after i created a ticket into a txt file on the system.

 

can somebody tell me if i can do this over a groovy script and how?

 

 

1 answer

0 votes
Vasiliy Zverev
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.
March 15, 2016

Here is a code exmple to write some text to a file on server:

File file = new File("c:\\text.txt");

FileOutputStream fileOutputStream = new FileOutputStream(file);

fileOutputStream.write("test string".bytes);
fileOutputStream.close();

Note, that file will be located on a server, not on a client machine.

Antonio D'Errico April 18, 2016

i get the following error:

 

Error creating issue: root cause: SyntaxError: ("mismatched input 'fileOutputStream' expecting NEWLINE", ('/data/home/jira/jss/jython/workflow/ticket.sh', 1, 17, 'FileOutputStream fileOutputStream = new FileOutputStream("/root/text.txt");\n'))

Suggest an answer

Log in or Sign up to answer