Where should I put the 'opencsv-3.5.jar' file for ScriptRunner to know it?

I tried to put opencsv-3.5.jar on JIRA_HOME/lib (of course I stopped and started Jira) but in behaviour script I still have :

import au.com.bytecode.opencsv.CSVReader : unable to resolve

Is it supposed to be on JDK?

 

regards,

Franck

4 answers

<jira-install>/atlassian-jira/WEB-INF/lib

Hello,

 

Still not working...

Regards,

Franck

Hello,

 

I try to reproduce : http://www.kellyrob99.com/blog/2010/07/01/groovy-and-csv-how-to-get-your-data-out/

 

in fact

import au.com.bytecode.opencsv.CSVReader
leads to an error : unable to resolve class CSVReader
import au.com.bytecode.opencsv
is accepted
but
List<String[]> rows = new CSVReader(        new InputStreamReader(getClass().classLoader.getResourceAsStream(TEST_FILE_NAME)))
            .readAll()
leads to an error : unable to resolve class CSVReader
regards,
Franck

Hi Frack 

As Jamie suggested in a previous post https://answers.atlassian.com/questions/31674855 you can use the JIRA native com.mindprod.csv.CSVReader and then get your file 

CSVReader reader = new CSVReader(new FileReader("yourfile.csv"));

You can find the documentation for it here : http://mindprod.com/application/csv.manual.html

Suggest an answer

Log in or Sign up to answer
Community showcase
Published Nov 29, 2018 in Marketplace Apps

How to set up an incident workflow from the VP of Engineering at Sentry

Hey Atlassian community, I help lead engineering at Sentry, an open-source error-tracking and monitoring tool that integrates with Jira. We started using Jira Software Cloud internally last year, a...

1,323 views 0 8
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you