Need help on Imporating Attachement from .Csv using Jiracli.

Kailash Pathak February 8, 2014

Hi,

I have some attachement in my C:\ drive. I want import issue (Story) along with attachements.

For each story there is unique attachement.

Is it possiable i add New Column "Attchement" in .csv file and in every row give the path of file that going to be associate with the issu.

e.g C:\KP\My.Jpg

And in property file (field.Attachment = Attachment)

Currently when i am importing giving me message "Unknown flag attachment"

Please correct me !

Thanks a lot for your support

Version:

Jira 6.0

Cli : 3.8.0

Regards,

Kailash

6 answers

0 votes
Kailash Pathak February 9, 2014

Bob,

I am not able to import data of Components.

After executing the .csv file the command message "This funcation require a non-blank value for parameter : issue"

-KP

0 votes
Kailash Pathak February 9, 2014

Thnaks Bob.

I am able to import the attachement

but i am facing problem in updating Component i am using "updateComponent" action .

Following field in my .csv file

Action Issue Project Component
updateComponent XX-2054 XX OPR Login
updateComponent XX-2065 XX Finalist Login

And Import.properties fiels has following fields :

field.issue = issue
field.project = Project
field.Component = Components

Please update me if i am missing any step.

-KP

Bob Swift OSS (Bob Swift Atlassian Apps)
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.
February 9, 2014

What problem are you seeing? I would note that your update isn't changing anything for the component.

0 votes
Kailash Pathak February 9, 2014

Hi Bob,

My import propertry file is below for above .csv file

field.Type = Type
field.issue = issue
field.project = Project
field.file = file

Please correct me !

-KP

0 votes
Kailash Pathak February 9, 2014

Hi Bob,

Below is my .csv file that i am imporating :

<colgroup><col width="80"> <col width="106"> <col span="2" width="64"> <col width="324"> </colgroup>
Action Type Issue Project file
CreateIssue AddAttachment Eeir-2054 Eeir C:\jiraCliLatest\1.xlsx
CreateIssue AddAttachment Eeir-2065 Eeir

C:\jiraCliLatest\2.xlsx

0 votes
Kailash Pathak February 9, 2014

Hi Bob,

Apart from "file" column what other column i have to add in .csv file. Please also let me update if there is any change in current command.

Regards,

Kailash Pathak

Bob Swift OSS (Bob Swift Atlassian Apps)
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.
February 9, 2014

Look at the addAttachment action and the parameters that is provides.

0 votes
Bob Swift OSS (Bob Swift Atlassian Apps)
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.
February 9, 2014

Attachments cannot be added on the same line as creating an issue. You can either follow this example or have a separate csv file to do all the attachments - the difficulty there is associating the attachment with the issue key it is intended for.

Kailash Pathak February 9, 2014

Please also let me know the changes i have to do in curreent command :

jira.bat --server https://xxxxx.com/jira--user xxxx --password "xxxx" --action runFromCsv --file import.csv --propertyFile import.properties --common --continue

Thanks a lot for you help!

KP

Kailash Pathak February 9, 2014

Thanks Bob!

Can you please help me on .CSV file, i mean column name i have to include / remove from current .csv file that i am using for normal Issue import.

Currently following column in my .csv file to import the issue

Action (CreateIssue)

Type (Story)

Objective (ABC)

Component (Test)

Status (Open)

Priortys (Major)

Labels (Test)

Assignee (KP)

Please Help !

-KP

Bob Swift OSS (Bob Swift Atlassian Apps)
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.
February 9, 2014

Follow the example . The current command should work. You will need to add the file column.

Suggest an answer

Log in or Sign up to answer