HowTo import issues » History » Version 6
Mischa The Evil, 2017-07-02 10:46
Add some info and examples from #25799.
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 | 3 | Moritz Who Cares | h3. Assignee |
62 | 5 | Pablo Estiga | |
63 | This must be the username. (Name and lastname works, tested on redmine 3.3) |
||
64 | |||
65 | h3. Category and Target version |
||
66 | |||
67 | During test with 3.3, the assistant allowed me to use an option to automatically create version or category. |
||
68 | |||
69 | h3. Project |
||
70 | |||
71 | The assistant will let you choose on which project you want to import the issue. |
||
72 | |||
73 | h2. Assistant |
||
74 | |||
75 | The assistant will help you (tested on 3.3): |
||
76 | |||
77 | # Will ask for options with the file: |
||
78 | *Field separator* |
||
79 | *Field wrapper* |
||
80 | *Enconding* |
||
81 | *Date Format* |
||
82 | !example_import_options1.jpg! |
||
83 | # Then next step will ask for the fields to match |
||
84 | 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. |
85 | 5 | Pablo Estiga | !example_import_csv.jpg! |
86 | |||
87 | 6 | Mischa The Evil | Attached attachment:"issues.csv" has the CSV used during test with 3.3. |