Comma-separated value (CSV) files are text files that represent tabulated data, and are supported by most systems that handle tabulated data, such as spreadsheets and databases. The CSV importer allows you to import data from external systems that can export their data in a tabulated format. It also allows you to create your own CSV file to perform bulk work item creation and updates.
You will need the Create work item project permission and the Make bulk changes global permission for the projects you want to create work items in. Note that your administrator can perform more advanced bulk imports. If you're an administrator, check out Importing and exporting data for more information. Users without administrator permissions will be able to import 250 work items per CSV file.
The bulk work item creation option for CSV imports can't map work items with a parent-child hierarchy relationship (e.g. Initiative > Epic > Story > Subtask).
To map hierarchies, you must use a CSV External System Import option instead. Refer to Import data using a CSV file and CSV import parent-child mapping for details.
CSV ファイルを準備する
既定の Microsoft Excel CSV 形式からご使用の CSV ファイルの構造を作成できます。フィールドはコンマで区切り、文字どおりに扱われる必要のあるコンテンツ (コンマ、改行、キャリッジ リターンなど) は、引用符で囲む必要があります。Microsoft Excel と OpenOffice は自動的にセル内の値を引用符で囲みます。このため、手動でこれらの値を引用符で囲む必要はありません。
CSV ファイルの要件:
- CSV ファイルは整形式である必要があります。
- Each CSV file must possess a heading row with a summary column. The header row is used to determine how to map data from the CSV file's 2nd row and beyond to fields in your project's work items. The header row should avoid containing any punctuation (apart from the commas separating each column) or the importer may not work correctly.
- 空の列値に対してカンマを省略することはできません。たとえば、以下に示す 2 番目のスニペットでは、空の [説明] フィールドと [優先度] フィールドのカンマが省略されていますが、これは許可されていません。
以下は有効な例です。
Summary, Assignee, Reporter, Work Type, Description, Priority
"Test work item", bob@example.com, bob@example.com, Task, ,
以下は有効な例ではありません。
Summary, Assignee, Reporter, Work Type, Description, Priority
"Test work item", bob@example.com, bob@example.com, 1
CSV ファイルのデータを構造化する方法
複数行にまたがるデータ
複数行にまたがるデータを取り込むには、CSV ファイルで二重引用符 ("
) を使用します。たとえば、インポート時に、Jira は以下を単一レコードの有効な CSV ファイルとして扱います。
Summary, Description, Status
"Login fails", "This is on
a new line", Open
文字通りに扱われる必要がある特殊文字
テキスト部分を二重引用符 ("
) で囲むと、その範囲の特殊文字を文字どおりに扱うように指定できます。このデータがインポートされると、これらの特殊文字は Jira のフィールド データの一部として保存されます。特殊文字の例としては、キャリッジ リターン / 改行文字 (上記に例示)、コンマなどがあります。
二重引用符を文字どおり扱うようにするには、もう1つ二重引用符を追加して「エスケープ」します。したがって、CSV 値は次のようになります。
"Clicking the ""Add"" button results in a page not found error"
これをインポートすると、次のように Jira に保存されます。Clicking the "Add" button results in a page not found error
Aggregating multiple values into a single field
You can import multiple values into a field that accepts multiple values (e.g. Fix (for) Version, Affects Version, Component, Labels). To do this, your CSV file must specify the same column name for each value you wish to aggregate into the mapped field. The number of column names specified must match the maximum number of values to be aggregated into the mapped field. For example:
WorkType, Summary, FixVersion, FixVersion, FixVersion, Component, Component
bug, "First work item", v1, , , Component1,
bug, "Second work item", v2, , , Component1, Component2
bug, "Third work item", v1, v2, v3, Component1,
In the above example, the Component field of the second work item and the Fix Version field of the third work item will generate multiple values in appropriate fields upon import.
Please be aware that only a limited number of fields support multiple values. The CSV importer will not allow you to import aggregated data into fields that only support a single value.
添付ファイル
You can attach files to work items created from your CSV file. To do this, specify the URL of your attachment in an 'Attachments' column within your CSV file.
Assignee, Summary, Description, Attachment, Comment
bob@example.com, "Work item demonstrating the CSV attachment import", "Please check the attached image below.", "https://jira-server:8080/secure/attachment/image-name.png", "01/01/2012 10:10;Admin; This comment works"
bob@example.com, "CSV attachment import with timestamp,author and filename", "Please check the attached image below.", "01/01/2012 13:10;bob@example.com;image.png;file://image-name.png", "01/01/2012 10:10;Admin; This comment works"
添付ファイルの URL は HTTP と HTTPS プロトコルをサポートしており、JIRA インスタンスが必ずアクセスできる任意の場所を設定できます。
Importing data into multiple projects
You can import work items from your CSV file into different projects through a CSV file import. To do this, add two columns to your CSV file with the "Project Name" and "Project Key" headings.
Make sure that every work item in your CSV file has a project name and project key in the relevant column. The project name and project key are the minimum project data required for importing work items from a CSV file into specific projects.
In the following example, the first and second work items will be imported into the 'Sample' project (with project key 'SAMP'), while the third work item will be imported into the 'Example' project (with project key 'EXAM'):
WorkType, Summary, Project Name, Project Key
bug, "First work item", Sample, SAMP
bug, "Second work item", Sample, SAMP
task, "Third work item", Example, EXAM
作業ログ エントリー
CSV ファイルには作業ログ エントリーを含めることができます。経過時間の追跡には秒を使用します。例:
Summary,Worklog
Only time spent (one hour),3600
With a date and an author,2012-02-10 12:30:10;wseliga;120
With an additional comment,Testing took me 3 days;2012-02-10 12:30:10;wseliga;259200
複数選択のカスタム フィールド
CSV ファイルに複数のエントリーを含めて、複数の値を持つ複数選択カスタム フィールドにデータを追加することができます。例:
Summary,Multi Select,Multi Select,Multi Select
Sample work item,Value 1,Value 2,Value 3
カスケード選択カスタム フィールド
次の構文を使用して、カスケード選択カスタム フィールドに値をインポートできます。'->' セパレーターを使用して階層をインポートできます。
Summary, My Cascading Custom Field
Example Summary, Parent Value -> Child Value
[選択リスト (カスケード)] のカスタム フィールドは、この方法ではインポートできません。提案については、 JRACLOUD-34202 - 課題情報を取得中... ステータス で追跡できます。代わりに、Jira 管理者は次の方法を使用できます: 設定 (⛭)> システム> [外部システム インポート] to と選択して、[選択リスト (カスケード)] フィールドをインポートします。
CSV ファイルインポート ウィザードを実行する
Select Filters in the sidebar, then select Search work items.
- [•••] (その他) > [CSV から課題をインポート] をクリックします。
- インポートする CSV ソース ファイルを選択します。[設定ファイルがない場合または新しい設定ファイルを作成する場合] を選択し、[既存の設定ファイルを使用する] オプションは選択しないようにします。設定ファイルは、CSV ファイルの見出し行の列名と Jira インストールのフィールド間のマッピングを指定します。インポート プロセスの最後に設定ファイルを作成するオプションがあります。
- [次へ] をクリックして必要な情報を入力します。CSV ファイルでコンマ以外の区切り文字を使用する場合、CSV 区切り記号フィールドでその文字を指定します。区切りが Tab の場合、「/t」という形式で入力できます。
Click Next and map the column headers of your CSV file to the fields in your selected project. If you want to select specific Jira field values to map specific CSV values to, check the Map field value option. You must map a CSV field to the summary field, as all work items created must have a summary.
Click Next one more time and select which CSV field values selected in the previous step you want to map to specific field values. For example, you might want to map the CSV field value of "Feature Request" to the Jira work type field value "New Feature".
- CSV データを Jira にインポートする準備ができたら、[インポート開始] をクリックします。エラーや警告があるかどうか確認する場合は、インポートを開始する前に [検証] をクリックします。似た設定 (類似のフィールド値マッピングなど) で別の CSV ファイルをインポートする場合、CSV 設定ファイルをダウンロードして設定を保存できます。
注意:
- 値を現状のままインポートしたい場合は、フィールド値のマッピング時にフィールドを空欄のままにしておくか、フィールド内のコンテンツを消去します。
- インポートに問題が発生したときや、プロセスについて詳細が必要な場合は、詳細ログをダウンロードできます。
CSV データを Jira フィールドにインポートするためのヒント
Below are some helpful tips when importing data from your CSV file into specific fields:
フィールド | インポート時の注意 |
---|---|
Project | CSV データはプロジェクト単位でインポートされます。対象として既存の JIRA プロジェクトを指定できますが、指定しなくても、インポート時にインポーターが自動的に新規プロジェクトを作成します。 |
要約 | これは唯一の必須フィールドです。 |
コンポーネント | You can import work items with multiple components by entering each component in a separate column. |
影響バージョン | You can import work items with multiple 'Affects Versions' by entering each version in a separate column. |
修正バージョン | You can import work items with multiple 'Fix Versions' by entering each version in a separate column. |
コメント本文 | You can import work items with multiple comments by entering each comment in separate columns with the same header name. |
期限 | CSV インポート ウィザードの 2 番目の手順で指定した日付形式を使用してください。 |
作業タイプ | If not specified in your CSV file, imported work items will be given the default (i.e. first) Work Type, as specified in your Jira instance. For more information, see Defining work type field values. インポートの過程で、まとめて新しい値を作成することもできます。 |
ラベル | You can import work items with multiple labels by entering each label in a separate column. |
優先度 | If not specified in your CSV file, imported work items will be given the default (i.e. first) Priority as specified in your Jira instance. インポートの過程で、まとめて新しい値を作成することもできます。 |
初期見積 (Original Estimate) | このフィールドの値は、秒数で指定する必要があります。 |
残余見積 (Remaining Estimate) | このフィールドの値は、秒数で指定する必要があります。 |
所要時間 (Time Spent) | このフィールドの値は、秒数で指定する必要があります。 |
ユーザー | ユーザーを作成 ユーザー タイプのすべてのシステム フィールドで、以下をサポートしています。
担当者または報告者フィールドの値として、インポーターに Jira ユーザーを自動で作成させることも可能です。
ユーザーの更新 Jira Service Management のポータル限定のカスタマー データの挙動は、他のユーザー アカウント データとは異なります。ポータル限定のカスタマー データがインポートと宛先で異なる場合は、宛先サイトのデータが使用されます。 |
必須フィールド | When importing to projects with mandatory fields, you must include the field in the *Create work item* screen associated to the work type being used. For more information, see Specifying field behavior. |
その他のフィールド | その他のフィールドをインポートする場合は、特定の Jira カスタムフィールド へのマッピングを行うことができます。JIRA にカスタムフィールドがまだ存在していない場合、インポーターは自動的にカスタムフィールドを作成します。カスタムフィールが日付フィールドの場合、CSV インポーター ウィザードの 2 番目の手順で指定した日付形式を使用してください。 |
ご不明な点がある、または CSV インポート プロセス中に問題が生じた場合は、アトラシアン サポートにご連絡ください。