create an issue with CLI specifying multiple field value

jacky.delahaye
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
June 25, 2019

Hello, 

I am trying to import tickets into JIRA with CLI from CSV files,
I have thought about writing a power shell  script that retrieve value into each CSV file into as many variable as necessary and concatenate them into a string that will become the JIRA CLI command.

the fist version of the script drops the following string 

jira --action createIssue --project "MyProject" --summary "test"
--type "Agent_Nouvel_Arrivant" --field  "bene_nom" --value "Name"
--field "bene_prenom --value "jacky"
-s "https://myserver.atlassian.net" -u "jacky.delahaye@altran.com"
-t xxxxxxxxxxxxxxxxxxxxx

I got the following errors
Error: Parameter 'field' cannot be declared more than once.
Error: Parameter 'value' cannot be declared more than once.

 

SO, I thought about using CLI command  to directly import the content of each csv file to createIssue

 

jira --action runFromCsv --common "--action createIssue" --file "c:\users\user\Documents\EDF JIRA\RE_Jira_EDF - QUALIF\ticket.csv" -s "https://myserver.atlassian.net" -u "jacky.delahaye@altran.com" -t xxxxxxxxxxxxxxxxxxxxx

 

I got the following error

Remote error: User is not authorized to perform the request. Response code: 401.


My question is the following,

Is there a way to create ticket specifying many field value by using Jira cli?

 

Best regards

1 answer

1 vote
Sudhir_Appfire_
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.
June 30, 2019

Hi @jacky.delahaye ,

We are from BobSwift support team and we have created a support request on behalf of you in our portal.

Could you please try to access the ticket Support-2636 and signup to our portal for further discussion on this ticket.

Thanks,
Sudhir

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events