Project

General

Profile

HowTo import issues » History » Revision 6

Revision 5 (Pablo Estiga, 2017-02-01 20:25) → Revision 6/7 (Mischa The Evil, 2017-07-02 10:46)

h1. HowTo import issues 

 "Since 3.2.0":http://www.redmine.org/news/104 Redmine can import issues from CSV files (#950). issues. 
 In the issues tab there is a import link on the right. You can import any CSV-type csv-type file. The first line must contain the column names. You can freely assign them to the different fields of an issue. 

 h2. Notes on different Fields 

 h3. Parent Issue 

 If the field starts with an #, the issue with that id is referenced. If the field contains a number it references the index of the issue in the import. Note that it's not the line number as line 1 contains the header. 

 From #23396#note-2: 
 > Jean-Philippe Lang wrote: 
 >> When importing issues, the content of a the parent colum can be: 
 >> * a number without # (eg: 10) => the parent will be the 10th imported issue 
 >> * a number with # (eg: !#10) => the parent will be the existing issue with id=10 

 {{collapse(Two examples...) 
 A CSV file looking like follows (note the parent column values with the #-sign omitted): 

 |Subject|Startdate|Duedate     |Parent| 
 |taskA    |1/1/2016 |12/31/2016|        | 
 |taskB    |1/1/2016 |12/31/2016|@1@     | 
 |taskC    |1/1/2016 |12/31/2016|@1@     | 
 |taskD    |1/1/2016 |12/31/2016|@3@     | 
 |taskE    |1/1/2016 |12/31/2016|@3@     | 
 |taskF    |1/4/2016 |12/31/2016|@4@     | 

 will be imported creating the following issues tree: 
 <pre> 
 taskA 
  -> taskB 
  -> taskC 
      -> taskD 
          -> taskF 
      -> taskE 
 </pre> 

 And, starting with Redmine version#119, you can even use a CSV file like: 

 |Subject|Startdate|Duedate     |Parent| 
 |taskF    |1/4/2016 |12/31/2016|@2@     | 
 |taskD    |1/1/2016 |12/31/2016|@5@     | 
 |taskE    |1/1/2016 |12/31/2016|@5@     | 
 |taskB    |1/1/2016 |12/31/2016|@6@     | 
 |taskC    |1/1/2016 |12/31/2016|@6@     | 
 |taskA    |1/1/2016 |12/31/2016|        | 

 which will be imported creating the following issues tree (equal to the example above): 
 <pre> 
 taskA 
  -> taskB 
  -> taskC 
      -> taskD 
          -> taskF 
      -> taskE 
 </pre> 
 This extended feature behaviour is implemented through a separated issue (#22701). 
 }} 

 h3. Assignee 

 This must be the username. (Name and lastname works, tested on redmine 3.3) 

 h3. Category and Target version 

 During test with 3.3, the assistant allowed me to use an option to automatically create version or category.  

 h3. Project 

 The assistant will let you choose on which project you want to import the issue.  

 h2. Assistant 

 The assistant will help you (tested on 3.3): 

 # Will ask for options with the file: 
 *Field separator* 
 *Field wrapper* 
 *Enconding* 
 *Date Format* 
 !example_import_options1.jpg! 
 # Then next step will ask for the fields to match 
 This is very interesting, because no matter what the names of the columns are, here you map which column is which field on the issue.  
 !example_import_csv.jpg! 

 Attached attachment:"issues.csv" has the CSV csv used during test with 3.3.