Project

General

Profile

HowTo import issues » History » Version 7

Joan J, 2023-03-13 12:30

1 1 Moritz Who Cares
h1. HowTo import issues
2
3 6 Mischa The Evil
"Since 3.2.0":http://www.redmine.org/news/104 Redmine can import issues from CSV files (#950).
4
In the issues tab there is a import link on the right. You can import any CSV-type file. The first line must contain the column names. You can freely assign them to the different fields of an issue.
5 1 Moritz Who Cares
6
h2. Notes on different Fields
7
8
h3. Parent Issue
9 3 Moritz Who Cares
10 1 Moritz Who Cares
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.
11
12 6 Mischa The Evil
From #23396#note-2:
13
> Jean-Philippe Lang wrote:
14
>> When importing issues, the content of a the parent colum can be:
15
>> * a number without # (eg: 10) => the parent will be the 10th imported issue
16
>> * a number with # (eg: !#10) => the parent will be the existing issue with id=10
17
18
{{collapse(Two examples...)
19
A CSV file looking like follows (note the parent column values with the #-sign omitted):
20
21
|Subject|Startdate|Duedate   |Parent|
22
|taskA  |1/1/2016 |12/31/2016|      |
23
|taskB  |1/1/2016 |12/31/2016|@1@   |
24
|taskC  |1/1/2016 |12/31/2016|@1@   |
25
|taskD  |1/1/2016 |12/31/2016|@3@   |
26
|taskE  |1/1/2016 |12/31/2016|@3@   |
27
|taskF  |1/4/2016 |12/31/2016|@4@   |
28
29
will be imported creating the following issues tree:
30
<pre>
31
taskA
32
 -> taskB
33
 -> taskC
34
     -> taskD
35
         -> taskF
36
     -> taskE
37
</pre>
38
39
And, starting with Redmine version#119, you can even use a CSV file like:
40
41
|Subject|Startdate|Duedate   |Parent|
42
|taskF  |1/4/2016 |12/31/2016|@2@   |
43
|taskD  |1/1/2016 |12/31/2016|@5@   |
44
|taskE  |1/1/2016 |12/31/2016|@5@   |
45
|taskB  |1/1/2016 |12/31/2016|@6@   |
46
|taskC  |1/1/2016 |12/31/2016|@6@   |
47
|taskA  |1/1/2016 |12/31/2016|      |
48
49
which will be imported creating the following issues tree (equal to the example above):
50
<pre>
51
taskA
52
 -> taskB
53
 -> taskC
54
     -> taskD
55
         -> taskF
56
     -> taskE
57
</pre>
58
This extended feature behaviour is implemented through a separated issue (#22701).
59
}}
60
61 7 Joan J
h3. Status
62
63
If we want to import existant issue status (not import all as New) we have to go to Adminstration -> Workflow and then check the "New Issue" field for the status, trackers and roles we want to import.
64
Otherwise we won't be able to import issues marked as closed for example.
65
66 3 Moritz Who Cares
h3. Assignee
67 5 Pablo Estiga
68
This must be the username. (Name and lastname works, tested on redmine 3.3)
69
70
h3. Category and Target version
71
72
During test with 3.3, the assistant allowed me to use an option to automatically create version or category. 
73
74
h3. Project
75
76
The assistant will let you choose on which project you want to import the issue. 
77
78
h2. Assistant
79
80
The assistant will help you (tested on 3.3):
81
82
# Will ask for options with the file:
83
*Field separator*
84
*Field wrapper*
85
*Enconding*
86
*Date Format*
87
!example_import_options1.jpg!
88
# Then next step will ask for the fields to match
89 1 Moritz Who Cares
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. 
90 5 Pablo Estiga
!example_import_csv.jpg!
91
92 6 Mischa The Evil
Attached attachment:"issues.csv" has the CSV used during test with 3.3.