I need help to parse CSV in Groovy. : JIRA Server
Hope you are doing well.
I am trying to create bulk jira users from CSV. I am using script runner console . However, failed to parse CSV.
https://library.adaptavist.com/entity/create-a-user-in-jira
I have added below code to above script for read csv file but don't know how to read particular column to pass value to variables.
File file = new File("<path_to_jira_home>/files/test.csv") // <-- Change this to your path...
if (file.exists() && file.isFile()) {
String[] lines = file.text.split('\n')
List<String[]> rows = lines.collect {
it.split(',')
}
} else {
"No file found at that location..."
}
Please share code if you already have.
Much appreciated....
Thank you,
Datta