CSV インポーターを利用して課題を作成する
If you have the Create Issue project permission and the Bulk Change global permission for the relevant projects, you can create issues in bulk using a comma-separated value (CSV) file. CSV files are text files that represent tabulated data, and are supported by most systems that handle tabulated data such as spreadsheets (MS Excel, Numbers) and databases.
CSV インポートを使用することで、表形式でデータをエクスポートできる外部システムからデータをインポートできます。また、独自の CSV ファイルを作成して、課題の一括作成および更新を実行することも可能です。
Your administrator has access to more import options designed specifically for other systems such as Github, Fogbugz and Bugzilla. If you are planning on importing from an external system a large amount of issues, administrators have access to advanced import functionalities by following: Migrating from Other Issue Trackers including Importing Data from CSV
CSV インポートを利用するには 2 つの手順を実行します。3 番目の手順はオプションです。
- ご使用の CSV ファイルを準備します。
- CSV インポート ウィザードを実行します。
- 後で使用するために設定を保存します。
CSV ファイルの準備
JIRA インポータープラグインは、CSV ファイルがデフォルトの Microsoft Excel 形式の CSV ファイルに基づいているものと想定します。フィールドはコンマで区切られ、文字どおりに扱われる必要のあるコンテンツ (コンマや改行/「キャリッジリターン」そのもの) は、引用符で囲まれます。
Microsoft Excel と OpenOffice の場合、セル内の値を引用符で囲む必要はありません。これらのアプリケーションでは、自動でこの処理が行われます。
CSV ファイルの要件
CSV ファイルには、"適切に構造化されている" ことに加えて次の要件があります。
各 CSV ファイルには、要約列を持つ見出し行が存在する必要がある
CSV ファイルのインポート ウィザードは、 CSV ファイルの見出し行を使用して、CSV ファイルの 2 行目以降のデータを JIRA のフィールドにどのようにマッピングするかを決定します。
見出し行には句読点を含まないようにします (各列を区切るコンマは除く)。これを行わない場合、インポーターが正しく機能しない可能性があります。
見出し行には "要約" データの列が含まれている必要があります。
列/フィールドのセパレーターとしてのコンマは省略不可
たとえば、以下は有効です。
Summary, Assignee, Reporter, Issue Type, Description, Priority
"Test issue", admin, admin, 1, ,
しかし、以下は無効です。
Summary, Assignee, Reporter, Issue Type, Description, Priority
"Test issue", admin, admin, 1
CSV ファイルで JIRA データ構造をカプセル化する
複数行にまたがるデータを取得する
Use double-quote marks (") in your CSV file to capture data that spans multiple lines. For example, upon import, JIRA will treat the following as a valid CSV file with a single record:
Summary, Description, Status
"Login fails", "This is on
a new line", Open
特殊文字を文字どおりに扱う
Use double-quote marks (") around a section of text to treat any special characters in that section literally. Once this data is imported into JIRA, these special characters will be stored as part of JIRA's field data. Examples of special characters include carriage returns/enter characters (as shown in the example above), commas, etc.
二重引用符を文字どおりに扱うようにするには、もう 1 つ二重引用符を追加して "エスケープ" します。したがって、CSV 値は次のようになります。
"Clicking the ""Add"" button results in a page not found error"
once imported, will be stored in JIRA as:Clicking the "Add" button results in a page not found error
複数の値を単一の JIRA フィールドに集約する
複数の値を受け入れる JIRA フィールド (修正対象バージョン、影響バージョン、コンポーネント、ラベルなど) には、複数の値をインポートできます。これを行うには、マッピングされる JIRA フィールドに集約する各値について、 CSV ファイルで同じ列名を指定する必要があります。指定される列名の数は、マッピングされるフィールドに集約される値の最大数と一致しなければなりません。例:
IssueType, Summary, FixVersion, FixVersion, FixVersion, Component, Component
bug, "First issue", v1, , , Component1,
bug, "Second issue", v2, , , Component1, Component2
bug, "Third issue", v1, v2, v3, Component1,
上記の例では、2 番目の課題のコンポーネントフィールドと 3 番目の課題の 修正対象バージョンフィールドは、インポート時に、該当する JIRA フィールドに複数の値を生成します。
複数の値をサポートしている JIRA フィールドは限定されているので注意してください。CSV インポーターは、単一の値のみをサポートしている JIRA フィールドへの集約データのインポートを許可しません。
添付ファイルをインポートする
CSV ファイルから作成された課題にファイルを添付できます。これを行うには、CSV ファイル内の "Attachments" 列で、添付ファイルの URL を指定します。
Assignee, Summary, Description, Attachment, Comment
Admin, "Issue 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"
Admin, "CSV attachment import with timestamp,author and filename", "Please check the attached image below.", "01/01/2012 13:10;Admin;image.png;file://image-name.png", "01/01/2012 10:10;Admin; This comment works"
URLs for attachments support the HTTP and HTTPS protocols and can be any location that your JIRA server must be able to access. You can also use the FILE protocol to access files in the
import/attachments subdirectory of your JIRA Home Directory.
複数の JIRA プロジェクトに課題をインポートする
CSV ファイルのインポートを通じて、課題を CSV ファイルから様々な JIRA プロジェクトにインポートできます。この操作を行うには:
- CSV ファイルには他に2つの列が必要です。これらの列の見出しには、プロジェクト名やプロジェクト キーに類似した名前を付けます。
- Ensure that every issue represented in your CSV file contains the appropriate name and key in these columns for the JIRA projects to which they will be imported.
The project name and key data is the minimum JIRA project data required for importing issues from a CSV file into specific JIRA projects.
IssueType, Summary, Project Name, Project Key
bug, "First issue", Sample, SAMP
bug, "Second issue", Sample, SAMP
task, "Third issue", Example, EXAM
上記の例では、最初と 2 番目の課題は「Sample」プロジェクト (プロジェクト キーは「SAMP」) にインポートされます。3 番目の課題は「Example」プロジェクト (プロジェクト キーは「EXAM」) にインポートされます。ここで、CSV ファイルインポート ウィザードの実行時に、ユーザーは CSV ファイルの「Project name」および「Project Key」フィールドをそれぞれ JIRA フィールドのプロジェクト名およびプロジェクト キーに対応付けていると仮定しています。
作業ログ エントリのインポート
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 ファイルには、1 つの複数選択カスタムフィールドへの複数のエントリを含めることができます。例:
Summary,Multi Select,Multi Select,Multi Select
Sample issue,Value 1,Value 2,Value 3
これは、複数の値を持つ複数選択カスタムフィールドにデータを追加します。
カスケード選択カスタム フィールドへのインポート
次の構文を使用して、カスケード選択カスタム フィールドに値をインポートできます。
Summary, My Cascading Custom Field
Example Summary, Parent Value -> Child Value
"->" セパレーターを使用すると、 階層をインポートできます。
NOTE: Currently JIRA does not support importing multi-level cascading select fields via CSV ( JRA-34202 - Getting issue details... STATUS ).
CSV ファイル インポート ウィザードを実行する
Before you begin: If your JIRA installation has existing data — Back up your existing JIRA data.
- 課題 > CSV から課題をインポートを選択して、バルク作成設定ページを開きます。(CSV から課題をインポートオプションがない場合、JIRA 管理者は JIRA インポータープラグインをバージョン 6.2.3 以上に更新する必要があります。)
- 設定ページで、CSV ソース ファイルを選択します。
設定ファイルがない場合や、新しい設定ファイルを作成したい場合は、既存の設定ファイルを使用するチェックボックスを選択しないままにします。設定ファイルは、CSV ファイルの見出し行の列名と JIRA インストールのフィールド間のマッピングを指定します。- このオプションを選択すると、既存の設定ファイルを指定するかどうか尋ねられます。
- このオプションを選択しない場合、CSV ファイルインポート ウィザードの最後に、JIRA は、以降の CSV インポートに使用できる設定ファイルを作成するかどうか問い合わせるメッセージを表示します。
- 次へボタンをクリックして、CSV ファイルインポート ウィザードの設定手順に進みます。必須のフィールドに入力します。
- CSV ファイルでコンマ以外の別の区切り文字を使用する場合、CSV 区切り記号フィールドでその文字を指定します。区切り記号が「Tab」の場合、「/t」という形式を使用して入力できます。
Click the Next button to proceed to the Map fields step of the CSV file import wizard. Here, you can map the column headers of your CSV file to the fields in your selected JIRA project. If you want to select specific JIRA field values to map specific CSV values to, tick the check-box for Map field value.
Note: You must map a CSV field to the JIRA summary field. This ensures the issues created have a summary.
Click the Next button to proceed to the Map values step of the CSV file import wizard. On this step of the import wizard you can select which specific CSV field values you want to map to which specific JIRA field value. For example, your issue types you may have a CSV field value of "Feature Request", which you may want to map to the JIRA issue type field value "New Feature".
Please Note:
- CSV ファイルインポート ウィザードの前の手順でフィールド値のマッピングチェックボックスが選択されたフィールドは、このページに表示されます。
値を現状のままインポートしたい場合は、フィールドを空欄のままにしておくか、フィールド内のコンテンツを消去します。
If you are importing a username-based CSV field (e.g. Reporter or Assignee) and you do not select the Map field value check box for this field in the previous step of the CSV file import wizard, then the importer will automatically map imported usernames from the CSV file to (lowercase) JIRA usernames.
Regardless of whether or not you select the Map field value check box, JIRA will automatically create usernames based on the data in your CSV file if they have not already been defined in JIRA.
- CSV データを JIRA にインポートする準備ができたら、インポート開始ボタンをクリックします。インポーターは、インポートの進行に合わせて更新状況を示し、インポートが完了すると、正常完了したことを示すメッセージを表示します。
- インポートが正しく設定されたと確信したら、インポート開始ボタンをクリックします。インポートが開始され、完了すると、エラーがある場合には通知されます。先にインポートを検査しておきたい場合は、検証ボタンをクリックします。これにより、JIRA はインポートを検証し、予想されるエラーまたは警告を通知します。この情報をもとに、ユーザーは設定をやり直し、修正してから、完全なインポートを実行することができます。
注意:
- インポートで問題が生じた場合 (または関心がある場合)、詳細ログのダウンロードリンクをクリックして、CSV ファイルのインポート処理に関する詳細情報を表示します。
- この手順を通じて使用した設定と同じ (または類似の) 設定で、別の CSV ファイルをインポートする必要がある場合は、設定を保存リンクをクリックして、CSV 設定ファイルをダウンロードします。この設定ファイルは、CSV ファイルインポート ウィザードの最初の手順で使用できます。
お疲れさまでした。CSV データが Jira に正常にインポートされました! ご不明な点や、問題が生じた場合は、アトラシアン サポートにご連絡ください。
CSV データを JIRA フィールドにインポートするためのヒント
データを CSV ファイルから特定の JIRA フィールドにインポートする場合に役立つヒントを以下に示します。
JIRA フィールド | インポート時の注意 |
|---|---|
プロジェクト | CSV データはプロジェクト単位でインポートされます。対象として既存の JIRA プロジェクトを指定できますが、指定しなくても、インポート時にインポーターが自動的に新規プロジェクトを作成します。 |
要約 | これは唯一の必須フィールドです。 |
コンポーネント | 単独の列に各コンポーネントを入力することで、複数のコンポーネントを持つ課題をインポートできます。 |
影響バージョン | 単独の列に各バージョンを入力することで、複数の「影響バージョン」を持つ課題をインポートできます。 |
修正バージョン | 個別の列に各バージョンを入力することで、複数の "修正バージョン" を持つ課題をインポートできます。 |
コメント本文 | 単独の列に各コメントを入力することで、複数のコメントを持つ課題をインポートできます。 |
期日 | CSV インポート ウィザードの 2 番目の手順で指定した日付形式を使用してください。 |
課題タイプ | If not specified in your CSV file, imported issues will be given the default (i.e. first) Issue Type as specified in your JIRA system Defining 'Issue Type' Field Values. You can also create new JIRA values on-the-fly during the import process. |
ラベル | 単独の列に各ラベルを入力することで、複数のラベルを持つ課題をインポートできます。 |
Priority | If not specified in your CSV file, imported issues will be given the default (i.e. first) Priority as specified in your JIRA system Defining 'Priority' Field Values. You can also create new JIRA values on-the-fly during the import process. |
初期見積り | このフィールドの値は、秒数で指定する必要があります。 |
残余見積り | このフィールドの値は、秒数で指定する必要があります。 |
消費時間 | このフィールドの値は、秒数で指定する必要があります。 |
ユーザー | 担当者または報告者フィールドの値として、インポーターに JIRA ユーザーを自動で作成させることも可能です。
|
その他のフィールド | If you wish to import any other fields, you can choose to map them to specific JIRA custom field(s). If your custom fields don't yet exist in JIRA, the importer can automatically create them for you. If your custom field is a date field, please use the date format specified on the second step of the CSV import wizard. |