Redmine Importer
Redmine Importer可以把.csv文件的列映射到Redmine Issue的相应字段,同时根据.csv文件的每一行创建或更新对应的issue。
Redmine Importer可以把.csv文件的列映射到Redmine Issue的相应字段,同时根据.csv文件的每一行创建或更新对应的issue。
作者: | redmineplugins.cn Admin | |
---|---|---|
主页: | https://github.com/leovitch/redmine_importer | |
版本库: | https://github.com/leovitch/redmine_importer | |
创建于: | 2022-04-21 | |
当前版本: | 1.2.2 | |
兼容性: | 5.1.*, 5.0.*, 4.2.*, 4.1.*, 4.0.*, 3.4.* |
Redmine Importer可以把.csv文件的列映射到Redmine Issue的相应字段,同时根据.csv文件的每一行创建或更新对应的issue。 该功能比较适用于批量【创建】或【更新】issues。尽管自redmine 3.2.0( #950 )开始已经具备类似功能,但是到目前的redmine 4.1.*版本仍不具备通过.csv文件批量【更新】问题的能力。
详细使用方法见官方wiki页面 https://github.com/leovitch/redmine_importer/wiki
Redmine Importer 使用手册 ...Redmine Importer 使用手册 ...
In general, the Redmine Importer will take the columns of a .csv file and map them to the fields of issues, and create one issue for each line of the the .csv file. It’s a good way to create Redmine issues when you have a large volume of issues to manage.
Below is a description of how to use the Importer. Also, see the SampleFiles page for a list of sample CSV files you can upload.
Select the “Import” item on the project bar and you will see the first CSV file upload screen. At this screen, you should click the “Choose File” button to select the CSV file to be uploaded. (For existing projects, in the project Settings, inside Modules, you will have to enable “Importer” for the Import item to appear.)
In the example below, the user has already selected “CustomField.csv” and is about to click the “Upload File” button.
Once you click “Upload File”, the Column Matching screen will be displayed. At this second screen, the most important thing is to confirm the mapping from your column headers to the available fields of a Redmine issue. If you are importing relationships between issues, you will also want to see the section on “Unique-valued Column” below to verify your other settings. When the options are correct, hit the “Submit” button.
Your issues will be imported and a summary of the number of records inserted and any problems found will be displayed. Note that importing a large number of issues can take a long time. If you left the “Send notification emails” checked, emails will be sent according to normal Redmine settings; if you turned that checkbox off, no emails will be sent (this can be handy when doing something like porting issues from one installation to another).
You should always provide a header row in your CSV file. The titles in this header row will help Redmine Importer figure out which column in your CSV files corresponds to which field of the Redmine issue.
It is suggested to always use UTF-8 encoding, comma as separator, and double-quote as delimiter for your CSV file. However, if you are working with CSV files from a legacy source, you can tweak the CSV file format details via the options in the CSV Upload screen.
The maximum supported size of CSV file depends on your database backend; it’s 4 megabytes for MySQL.
Here is the list of headers the Redmine will automatically recognize; they correspond to fields of a Redmine issue.
Note that while they are all listed here for completeness, all fields are optional. You only need to provide data for the items you actually want to set.
If you use the column headers given above, they should automatically match no matter what language Redmine is displaying.
In addition to the strings above, Redmine Importer will try to automatically match columns which are the same as the localized version of the field names in Redmine. If the columns don’t match automatically, just be sure to set the field match pulldowns in the Column Matching screen.
You should be able to use the importer to import custom fields in the same manner as built-in fields. You need to set the custom fields up in the Settings tab ahead of time; Redmine Importer will not create custom field definitions automatically.
If there is any chance of using your custom field as a unique-valued column (see below) the “Used as a filter” checkbox must be on.
In addition to the basic import functions described above, Redmine Importer supports updating existing issues, setting the parent task of an imported task, and importing task relationships. Doing so requires that one line in your imported CSV file somehow be able to refer to a pre-existing issue or another line in the CSV file.
In these situations, you must specify one column in your CSV file which is a Unique-valued Column, meaning that all the relevant tickets use a different value in this column. This enables you to use the value of that column as a unique identifier when referring to a different issue.
For instance, if you know that all the issues you are working with definitely have different Subject fields, you can use Subject as your Unique-value Column. That means that in your CSV file, when you want to refer to another row, you can refer to it by its subject.
Therefore, you could import parent-child task relationships by having a CSV file like this:
Subject | Description | Parent task |
---|---|---|
Main Task | ...description... | |
Sub task | ...description... | Main Task |
However, it may be difficult to guarantee that issues will always have unique subjects, especially if your users are editing them. Therefore, another way to set up a unique column is to add a custom field in Redmine, and then use the value of the custom field as your Unique Column. If you are using Redmine Importer to transfer information from another system this may be particularly effective; the other system may already have some unique piece of information. Alternatively, if you’re exporting your CSV file from a spreadsheet, it’s quite easy to generate a time+serial number value which is unique for every line.
For instance, if you created a custom field called “External Id” and then wanted to use that as your unique column to import parent/child and dependency relationships, you might end up uploading a CSV file like this:
Subject | Description | External Id | Parent task | follows |
---|---|---|---|---|
Main Task | ...description... | T0001 | ||
Sub task 1 | ..description... | T0002 | T0001 | |
Sub task 1A | ..description... | T0003 | T0001 | |
Sub task 1B | ..description... | T0004 | T0001 | T0003 |
Sub task 2A | ..description... | T0005 | T0001 | |
Sub task 2B | ..description... | T0006 | T0001 | T0005 |
When creating new issues, it is only required that your unique column be unique among all the issues you are importing. If you want to update existing issues (see below), the unique column must be unique across all issues in the project.
All of the examples so far have talked about using Redmine Importer to create new issues. However, if your Unique Column values are unique across all issues in your project, you can also use Redmine Importer to update existing issues. To enable this, turn on the “Update Existing Issues” checkbox in the Column Matching screen.
In this case, Redmine Importer will use the value in the unique column to query the database and find the existing issue to update. Remember that all of the matching columns from the CSV file will be updated, so you might overwrite values that have changed in Redmine. If you want to skip a column on import, just set it to “Ignore” on the Column Matching screen.
Redmine Importer processes your CSV file in order from the beginning to the end. Because of this, when making references to other columns using unique columns, you can only refer to issues that are earlier in the CSV file. You cannot refer to issues that come further down in the file.
If this is unworkable, there’s a straightforward but non-obvious workaround: import the CSV file twice. The first time, set all of the relationship columns to “Ignore” so you’re just importing the basic data. The second time, be sure to set your Unique Column and to turn on the “Update Existing Issues” checkbox. Since all the issues will already exist in the database, they can now be found.
Redmine Importer can only have one column mapped to given field value. Because of this, it cannot import more than one issue relationship of the same relationship type in one upload. That is, while in fact Issue C may “follow” both Issue B and Issue A, because you can’t have two columns with the header “follow” you can’t import that information all at once.
The workaround is to import twice, ignoring one of the columns the first time, and turning on “Update Existing Issues” and ignoring the other column the second time.
In general, it’s fine to re-import a CSV file that declares issue relationships. Redmine Importer will check whether the relationship already exists and only create any that are missing. However, Redmine Importer cannot delete relationships, so any issue relationships that were created previously will remain in existence even if they are not in the new CSV file.
In the same way, if you re-import a file that includes a Watchers column, any new watchers will be added to the issue, but Redmine Importer never deletes existing watchers.
If you’ve been around databases, you might think that using the Redmine issue number is the obvious solution for Unique Columns. This works fine for updating: if you create a column whose header is “Id”, it will automatically be recognized as the Redmine issue number and used to refer to other tickets. However, this is often inconvenient because the Redmine issue number doesn’t exist until the issue is created – that means it’s impossible to use it to set up in an import. It can also be impractical to get the Redmine issue numbers out of Redmine after the initial creation.
In the redmine_importer/test/samples directory, there are some sample .csv files. See SampleFiles for instructions on how to set up and import all of these files, which will give you a good sense of what Redmine Importer can do.
积分(10)
兼容性: Redmine 3.4.*, 4.0.*, 4.1.*, 4.2.*, 5.0.*, 5.1.*
以下是基于1.2.2版的各分支版本,文件名后缀分别针对redmine-3.4.*,redmine-4.0.*,redmine-4.1.*,redmine-5.*请对应下载。
文件
redmine_importer-1.2.2_4.1.zip (32.7 KB)
redmine_importer-1.2.2_4.0.zip (32 KB)
redmine_importer-1.2.2_3.4.zip (32.2 KB)
redmine_importer-1.2.2_5.zip (34.8 KB)
没有任何数据可供显示
# | 跟踪 | 状态 | 作者 | 主题 | 更新于 |
---|---|---|---|---|---|
100 | 报错 | 已解决 | guo yunxia | 导入csv文件 导入时报错 | 2020-10-09 11:53 |
137 | 咨询 | 已解决 | 超 杭 | 到底怎么判断哪些字段应该忽略,哪些又不应该 | 2021-07-01 13:25 |
141 | 报错 | 进行中 | 张 友慧 | 在redmine项目上建立project的项目导入按钮 | 2021-01-20 14:23 |
142 | 报错 | 已解决 | ZHONGWU TANG | import 导入CSV 文件报错 | 2021-03-31 21:48 |
143 | 咨询 | 已解决 | jason jason | 导入后redmine不显示 | 2021-07-01 13:26 |
144 | 咨询 | 已解决 | jason jason | 导入后提示有问题 这个csv的模板应该怎么样 | 2021-07-01 13:27 |
185 | 咨询 | 已解决 | H CJ | 按照安装步骤安装插件后两个redmine服务起不来 | 2021-03-31 21:19 |
223 | 咨询 | 已解决 | sun sure | 启用导入功能后 报错 点击导入找不到 | 2021-07-01 13:27 |
355 | 报错 | 进行中 | 欧阳 张宇 | 下载redmine_importer-1.2.2_3.4.zip后,提示该文件为非压缩文件,无法打开 | 2022-05-09 15:18 |
406 | 报错 | 进行中 | chen tom chen | 用户类型的字段导入后值为空 | 2022-09-27 14:07 |
407 | 报错 | 进行中 | chen tom chen | 不能识别编码 | 2022-09-28 14:24 |
456 | 咨询 | 已解决 | 葛 华实 | 导入csv 后redmine 页面报错 Internal error | 2023-02-01 14:00 |
468 | 报错 | 待反馈 | zhu rungang | 服务起不来 | 2023-05-16 13:05 |
469 | 报错 | 已解决 | song tong | 数据导入之后 显示成功或者识别的信息都不完整。 | 2023-02-28 08:36 |
483 | 报错 | 待反馈 | Tsai Eric | Update existing issue by custom field发生duplicate 的error | 2023-05-15 18:47 |
501 | 报错 | 进行中 | Deng Wilson | 匯入csv 產生internal server error | 2023-03-27 14:33 |
502 | 报错 | 待反馈 | Deng Wilson | 匯入csv 產生internal server error | 2023-05-15 18:43 |
547 | 报错 | 待反馈 | hu eliotte | 导入的时候500错误了 | 2023-08-23 08:22 |
602 | 咨询 | 已解决 | zeng zengli1855 | 导入csv文件时提示“跟踪”“状态”不可为空字节 | 2024-01-17 12:55 |
699 | 报错 | 已解决 | 成 柳 | 安装命令报错 | 2024-06-05 17:20 |
710 | 咨询 | 进行中 | swl beyond | 咨询导入问题 | 2024-06-25 18:08 |
评论
添加评论
由 li deben 在 2 天 之前添加
请问这支持Redmine 5.0.2么?
由 redmineplugins.cn Admin 在 2 天 之前添加
@li deben 你好,补充了之前遗漏的 redmine_importer-1.2.2_5.zip
由 swl beyond 在 6 个月 之前添加
刚买过,迅雷没下载成功。怎么刷新下就不让下载了?购物车里面也找不到这个插件?5积分一次下载机会吗?
由 redmineplugins.cn Admin 在 6 个月 之前添加
swl beyond 已发送的邮箱,方便时查收。
由 redmineplugins.cn Admin 在 6 个月 之前添加
swl beyond 你好,网站不支持下载工具。稍候补发到邮箱里。
由 swl beyond 在 6 个月 之前添加
@redmineplugins.cn Admin 好的,谢谢了。刚下载的时候没注意看要禁止下载工具下载。以为就算下载失败也能在购物车里看到重新下载,后来才发现购物车里找不到记录
由 guo hongxing 在 6 个月 之前添加
swl beyond 通过积分下载的插件不会在购物车里显示。只有将插件的付费版本加入购物车后,购物车里才能看到。
由 匿名用户 在 12 个月 之前添加
为什么5.0版本消失了?
由 Tan Frank 在 大约一年 之前添加
这个按照指导(几乎所有的安装指导)都要求运行XXX,但是我确实不知道运行啥,在哪里运行?
比如如下说明:
迁移数据库
windows
set RAILS_ENV=production
bundle exec rake redmine:plugins:migrate
到底该如何 set XXX, 如何 bundle XXXX?
请大神指教。
由 guo hongxing 在 大约一年 之前添加
@Tan Frank 上述指令需要先进入console控制台,再切换到redmine的安装目录下执行。
由 lin alex 在 将近 2 年 之前添加
想詢問您遇到這個錯誤有沒有解法,我的是4.2.2版本的,謝謝~
StandardError: An error has occurred, all later migrations canceled:
Directly inheriting from ActiveRecord::Migration is not supported. Please specify the Rails release the migration was written for:
Caused by:
StandardError: Directly inheriting from ActiveRecord::Migration is not supported. Please specify the Rails release the migration was written for:
由 guo hongxing 在 将近 2 年 之前添加
@lin alex 你好,试试修改 class CreateImportInProgresses < ActiveRecord::Migration[4.2] ,将4.2改为5.2
由 lin alex 在 超过一年 之前添加
錯誤訊息如下,我有用gem install fastcsv,但似乎還是少了下面的檔案
require’: No such file to load – fastercsv.rb
由 lin alex 在 超过一年 之前添加
感謝您的回覆,似乎有成功安裝插件,但是在顯示錯誤訊息後Server的服務處於開不起來的狀態,如Thin_redmine和Thin_redmine2
,可以詢問您如何解嗎,感謝~
由 guo hongxing 在 超过一年 之前添加
@lin alex 像是插件安装异常导致服务无法正常启动。建议通过手动启动thin,抓到具体的报错原因。方法:bundle exec thin start
由 redmineplugins.cn Admin 在 超过一年 之前添加
@lin alex 不用手动 gem install fastcsv, 重新执行 bundle install 试试看呢?
由 lin alex 在 超过一年 之前添加
Bundle install之前試過,還是會跳一樣的錯誤
由 匿名用户 在 超过一年 之前添加
@lin alex 像是你的redmine_importer的版本问题,插件版本是?
由 lin alex 在 超过一年 之前添加
我是基於這個網址下載的插件
https://github.com/leovitch/redmine_importer
由 guo hongxing 在 超过一年 之前添加
@lin alex 这个版本不支持redmine 4.2.2
由 lin alex 在 超过一年 之前添加
有一個問題想請教,如果有些功能我不想要,可以怎麼快速的讓選項不顯示,感謝~
由 guo hongxing 在 超过一年 之前添加
@lin alex 是什么样的功能? 最好能具体描述下
由 lin alex 在 超过一年 之前添加
可以請您寄給我4.2.2適用的版本嗎,感謝您~
由 redmineplugins.cn Admin 在 超过一年 之前添加
@lin alex 邮件已发
由 匿名用户 在 超过一年 之前添加
很感謝您的幫助,另外有一個問題想請教,如果有些功能我不想要,可以怎麼快速的讓選項不顯示,感謝?
由 匿名用户 在 超过一年 之前添加
錯誤訊息如下,我有用gem install fastcsv,但似乎還是少了下面的檔案,想請您指點如何安裝,感謝?
require’: No such file to load – fastercsv.rb
由 zhu rungang 在 将近 2 年 之前添加
docker 版本 Redmine 5.0.4 支持么,目前服务起不来
由 guo hongxing 在 将近 2 年 之前添加
可以支持 redmine 5.0.4 ,下面是我的测试环境:
由 redmineplugins.cn Admin 在 超过 3 年 之前添加
@rowan wiki 可以在4.2上试试支持4.1的版本
由 rowan wiki 在 超过 3 年 之前添加
是否支持4.2版本?
由 redmineplugins.cn Admin 在 超过 3 年 之前添加
确保你导入的csv文件编码格式为UTF8格式
由 H CJ 在 超过 3 年 之前添加
中文乱码啊