Issue Details (XML | Word | Printable)

Key: JRA-6148
Type: Improvement Improvement
Status: Open Open
Priority: Major Major
Assignee: Unassigned
Reporter: Anton Mazkovoi [Atlassian]
Votes: 19
Watchers: 13
Operations

Add/Edit UI Mockup to this issue
If you were logged in you would be able to see more operations.
JIRA

Extend CSV importer to import attachments

Created: 09/Mar/05 01:37 AM   Updated: 14/Jul/08 10:42 AM
Component/s: Attachments
Affects Version/s: None
Fix Version/s: None

Time Tracking:
Not Specified

Issue Links:
Duplicate
 

Participants: Anton Mazkovoi [Atlassian], Gail Coulthard, Jeff Turner [Atlassian], sharjeel arif butt and Timothy Hanna
Since last comment: 20 weeks, 2 days ago
Support reference count: 9
Labels:


 Description  « Hide
The path to attachments can be recorded in the CSV file. The importer can tehn grab the file(s) and attach it to the relevant issue.

 All   Comments   Work Log   Change History      Sort Order: Ascending order - Click to sort in descending order
sharjeel arif butt added a comment - 23/Jun/06 02:11 PM
can anybody let me know how this problem of importing an attachment within the csv file can be solved?? its surprising that JIRA doesn't support this feature because people/firms that already deploy applications would have to either re-enter their records all over again or start creating new ones and never use the old ones which usually isn't the case. Can someone please let me know how this problen can be tackled? sharjeel_arif@hotmail.com and/or butt.sharjeel@mayo.edu
I would really appreciate the help and concern!!
Thank You
Sincerely
Sharjeel

Jeff Turner [Atlassian] added a comment - 27/Jun/06 09:16 PM
Sharjeel,

It does seem quite a serious omission in the CSV importer. We will look into getting it implemented in an upcoming release.

For now, something could be scripted up to create a Jelly script from the CSV file, using the AttachFile tag to import attachments:

http://www.atlassian.com/software/jira/docs/latest/jelly.html#AttachFile

You would need some way of identifying the JIRA issue key for each CSV line. Perhaps a SQL query to the database searching for a particular custom field, or set of values that uniquely identify the issue.

Cheers,
Jeff


sharjeel arif butt added a comment - 28/Jun/06 10:36 AM
Jeff,
Thanks for the response. I think i will explain my situation and maybe you
could help me further. In our old system, the backend was in Access. Now the
application that is the front end has the attachments written in text within
the Description field of the issues. In order to open up an attachment, the
filename (written in the Description box) is to be clicked and hence the
attachment opens. In Access, all we have in the Attachments table is the
name of the attachment file associated with a unique number (PR #). Now when
i convert the tables into CSV format, how will is be possible to work with
attachments in this case?
I hope you get what I'm saying.
Thanks
Sharjeel

sharjeel arif butt added a comment - 28/Jun/06 10:41 AM
Jeff,
Thanks for the response. I think i will explain my situation and maybe you
could help me further. In our old system, the backend was in Access. Now the
application that is the front end has the attachments written in text within
the Description field of the issues. In order to open up an attachment, the
filename (written in the Description box) is to be clicked and hence the
attachment opens. In Access, all we have in the Attachments table is the
name of the attachment file associated with a unique number (PR #). Now when
i convert the tables into CSV format, how will is be possible to work with
attachments in this case?
I hope you get what I'm saying.
Thanks
Sharjeel

Jeff Turner [Atlassian] added a comment - 28/Jun/06 09:32 PM
> In Access, all we have in the Attachments table is the name of the attachment file associated with a unique number (PR #). Now when i convert the tables into CSV format, how will is be possible to work with attachments in this case?

You could:

  1. Import the PR # into JIRA as a custom field. I suggest using the 'Import Id' custom field type. You would need to first create a 'PR #' custom field of this type before you run the CSV importer.
  2. Write a script or program that loops through the Attachments table in Access, and for each row (PR #, attachment filename):
    1. looks up the JIRA issue key associated with the PR #. This can be done with SQL, for example:
      select pkey from jiraissue, customfield, customfieldvalue where jiraissue.id=customfieldvalue.issue and customfield.id=customfieldvalue.customfield and customfield.cfname='Old PR #' and customfieldvalue.NUMBERVALUE=798

      This SQL assumes you had created a 'Old PR #' custom field of type 'Import Id'. It returns the JIRA key corresponding to PR #798.

    2. Outputs Jelly script text:
      <jira:AttachFile key="$JIRAKEY" filepath="$PATH"/>
      where $JIRAKEY is the JIRA key looked up in the previous step, and $PATH is the attachment path read from Access.

When this script runs, it will generate text constituting a Jelly script. You can then save this as a file, add the Jelly header/footer as required, and run it in JIRA.

Let me know if you have any questions on this.

Cheers,
Jeff


sharjeel arif butt added a comment - 07/Jul/06 10:33 AM
Jeff,
I'm back with more questions. I would really appreciate if you could help a
bit more. If 200 users are using JIRA, what will the system speed be like?
Will we notice? Second, what happens if more than one person has an issue
open and makes changes at the same time? How would that work? Also, I'd like
to know how is it possible to change the Filter field settings? For example,
instead of having a radio button to select just one option, I would like to
select more than one option in my search criteria (which in this case I
assume would require a list box from which I can select multiple values) and
vice versa. And what if I don't want certain fields to show up when i do the
filter, how am I supposed to remove them?
Your help is really appreciated!
Thanks
Sincerely
Sharjeel

Jeff Turner [Atlassian] added a comment - 09/Jul/06 07:17 PM
> If 200 users are using JIRA, what will the system speed be like? Will we notice?

200 users should be no problem. Many JIRA installations have tens of thousands.

> Second, what happens if more than one person has an issue open and makes changes at the same time?

If two people edit an issue at the same time, the last edit wins. The change history will record both modifications.

> For example, instead of having a radio button to select just one option, I would like to select more than one option in my search criteria (which in this case I assume would require a list box from which I can select multiple values) and vice versa. And what if I don't want certain fields to show up when i do the filter, how am I supposed to remove them?

You'll have to be more specific about what fields you're using. Custom fields, for example, have search templates which determine how they can be searched (single or multiple values). You can customize which columns appear in search results.

If you have any further questions, please mail jira-support@atlassian.com or create a support issue.

Cheers,
Jeff


Gail Coulthard added a comment - 18/Sep/06 03:00 PM
This seems to be a basic necessity for users who are importing - it would certainly make my life easier if this was available.

Timothy Hanna added a comment - 14/Jul/08 10:42 AM
This issue has not seemed to have been addressed in awhile. Can anyone tell me the status or what is being done about it?

Thanks,

Tim