Importing details of repeating to issues (CSV)
Importing data from CSV file
The Repeating Issues add-on, allows you to import repeating issues details from a comma-separated value (CSV) file. CSV files are text files representing tabulated data and are supported by most applications that handle tabulated data (for e.g. Microsoft Excel, databases, etc.).
To import repeating issues please go to Jira Administration > System > Issues > Repeating Issue > Repeated Issues and then in the actions menu on the right (the button with label "...") select "Import repeatings".
Preparing your CSV file
The add-on assumes that your CSV file is based off a default Microsoft Excel-styled CSV file. Fields are separated by commas and any content that must be treated literally, such as commas and new lines/'carriage returns' themselves are enclosed in quotes. The basic CSV file requirements is pretty similar with such used in The JIRA Importers plugin, which is bundled with JIRA. That means you can use the same import file to import issues to Jira, and then use the same file to import repeatings details.
The Repeating Issues add-on import will not create new issues. Import will only updates the repeating details in already existing issues in Jira. To import new issues please use for example The JIRA Importers plugin.
Additional CSV file requirements
In addition to being 'well-formed', CSV files have the following requirements:.
- Each CSV file must possess a heading row with at least "Issue key" or "Summary" column. This columns are used to match proper issue for repeating
- Each CSV file must possess a heading row with "Repeating" column
- "Repeating" column should have JSON value with details of repeating. See repeating JSON value format
Treating special characters literally
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. Just like in The JIRA Importers plugin
To treat a double quote mark literally, you can 'escape' them with another double quote mark character. Hence, the CSV value:
"This is ""Repeating Issues"" add-n"
once imported, will be stored in JIRA as:This is "Repeating Issues" add-on
Matching proper issue for repeating
During import issues can be matched in two ways:
- Direct matching by issue key - this is the best if you know exactly the issues keys to which you want to import repeatings
Issue summary matching - this is the best if you had previously import issues to Jira with The JIRA Importers plugin and you do not know imported issues keys. In this situation you can use the same import file where "Summary" column is provided. Issues will be matched by theirs summary. This can lead to ambiguous issue matches, e.g. when there are issues with the same summary in different project. Then you can add "Project key" column to csv data to limit matched issues into one project.
By default records with ambiguous issue matches will not be imported. To force import such record please check the "Import ambiguous records" option on import view.
Repeating JSON value in CSV file
The CSV file require "Repeating" column with JSON value with following structures:
{ "rRule": "INTERVAL=3;FREQ=DAILY;COUNT=35", "action": "CloneIssue", "startDate": "2018-06-27T13:32:00+02:00", "actionParams": { "summary": "CLONE - ${sourceIssue.summary}", "reporter": "admin", "assignee": "-1", "scheduleType": "issueCreateDate", "issueDuration": 2, "cloneLinks": false, "cloneSubTasks": false, "cloneSprintValues": false, "preventAutoWatch": false, "notifyWatchers": false } }
{ "rRule": "INTERVAL=3;FREQ=DAILY;COUNT=35", "action": "CreateSubTaskIssue", "startDate": "2018-06-27T13:32:00+02:00", "actionParams": { "summary": "CLONE - ${sourceIssue.summary}", "reporter": "admin", "assignee": "-1", "scheduleType": "issueCreateDate", "issueDuration": 2, "issuetype": "10001", "components": [ "10000" ], "description": "Some description with repeating date time variable ${repeatingDateTime}", "preventAutoWatch": false, "notifyWatchers": false } }
{ "rRule": "INTERVAL=3;FREQ=DAILY;COUNT=35", "action": "DoIssueWorkflow", "startDate": "2018-06-27T13:32:00+02:00", "actionParams": { "workflowId": "11", "notifyWatchers": false } }
Remember that this value should be enclosed in quotes and all the inner quotes should be "escaped" with another double quote mark character. Just like that:
"{""rRule"":""INTERVAL=3;FREQ=DAILY;COUNT=35"",""action"":""DoIssueWorkflow"",""startDate"":""2018-06-27T13:32:00+02:00"",""actionParams"":{""workflowId"":""11"",""notifyWatchers"":false}}"
JSON properties explanations and values
Property | Description | Values |
---|---|---|
rRule | Recurrence rule defined as RFC 2445. Together with startDate and actionParams.scheduleType this will define when repeating will trigger. | Any string representing rule in RFC 2445. Examples
Repeating Issues add-on supports only DAILY, WEEKLY, MONTHLY, and YEARLY values for RFC 2445 FREQ field |
action | Action that should be repeated. | One of:
|
startDate | Defines the start date and time relative to which subsequent occurrences are calculated on the recurrence rule. | A full date and time without millis, separated by a 'T' (yyyy-MM-dd'T'HH:mm:ssZZ) in Jira default time zone. Example:
|
actionParams.summary | Summary that will be set to new cloned issue. This field can have parameters like ${repeatingDate} - for details please follow Available variables in repeating action param strings | Any string. |
actionParams.reporter | User which will be set as reporter of new cloned issue or new created sub-task. | Jira "username" as string. Example:
|
actionParams.assignee | User which will be set as assignee of new cloned issue or new created sub-task. | Jira "username" as string. Example:
Special values:
|
actionParams.scheduleType | Defines which issue date should be repeated: issue create date or issue due date. This is equivalent for "Repeat for" field in UI form. See Scheduling Clone Issue action for details. | One of:
|
actionParams.issueDuration | The number of working days between new cloned issue created date and due date. Please read how to configure non-working days. | Positive integer value. |
actionParams.cloneLinks | When true - all source issue links (excluding Clone link) will be cloned to new cloned issue. | Boolean value: true/false. |
actionParams.cloneSubTasks | When true - all sub-tasks from source issue will be cloned as sub-tasks to new cloned issue. | Boolean value: true/false. |
actionParams.cloneSprintValues | When true and Jira Agile is available - sprint field values from source issue will be also cloned to new cloned issue. | Boolean value: true/false. |
actionParams.preventAutoWatch | When true - the creator will not be notified of any changes to new cloned issue. This is equivalent for "Remove me from watchers" field in UI form. See Scheduling Clone Issue action for details. | Boolean value: true/false. |
actionParams.notifyWatchers | When true - watchers of new created issue will be notified via email. See Email notifications. | Boolean value: true/false. |
actionParams.issuetype | Issue type of new created sub-task. | Project issue type id as string. |
actionParams.components | Project components which will be set to new sub-task issue. | List of project component id as string. |
actionParams.description | Description that will be set to new sub-task issue. This field can have parameters like ${repeatingDate} - for details please follow Available tokens in action param strings | Any string. |
actionParams.workflowId | The transition of current workflow related with issue project that should be executed. | Id of workflow transition as string. |
Sample CSV file content
Summary, Repeating "Test issue", "{""rRule"":""INTERVAL=3;FREQ=DAILY;COUNT=35"",""action"":""CloneIssue"",""actionParams"":{""summary"":""CLONE - ${sourceIssue.summary}"",""cloneSubTasks"":false,""cloneLinks"":false,""cloneSprintValues"":false,""reporter"":""admin"",""assignee"":""-1"",""preventAutoWatch"":false,""scheduleType"":""issueCreateDate"",""issueDuration"":0,""notifyWatchers"":false},""startDate"":""2018-06-27T13:32:00+02:00""}" "Test issue 2", "Test issue 3", "{""rRule"":""INTERVAL=3;FREQ=MONTHLY;UNTIL=20191226T220000Z;BYDAY=MO,TU,WE,TH,FR;BYSETPOS=-1"",""action"":""CloneIssue"",""actionParams"":{""summary"":""CLONE - ${sourceIssue.summary}"",""cloneSubTasks"":false,""cloneLinks"":false,""cloneSprintValues"":false,""reporter"":""admin"",""assignee"":""-1"",""preventAutoWatch"":false,""scheduleType"":""issueCreateDate"",""issueDuration"":0,""notifyWatchers"":false},""startDate"":""2018-06-27T13:32:00+02:00""}"