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

0 vote

<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
How to earn badges on the Atlassian Community

How to earn badges on the Atlassian Community

Badges are a great way to show off community activity, whether you’re a newbie or a Champion.

Learn more
Community showcase
Published Jul 10, 2018 in Marketplace Apps

If you’re an Atlassian app developer, you’ll want to know about Atlas Camp!

This September 6-7, hundreds of Atlassian App developers will flock to Barcelona Spain to build skills, discover product roadmaps, meet face-to-face with the Atlassian team, and learn how to extend t...

179 views 0 4
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