On this page
Use case
Clone an epic, the tasks under the epic and the sub-tasks of these tasks.
Prerequisites
Configuration
Related use cases
If you still have questions, feel free to refer to our support team.
Clone an epic, the tasks under the epic and the sub-tasks of these tasks.
Create a Text (single line) custom field
Name: Template Issue
Issue to be created
Choose Single issue
Choose Parser expression (standard issue type) and write the following expression:
%{issue.issueType}
Enter the following expression with parsing mode set to Basic text
CLONE - %{issue.summary}
Update the following fields
Choose Parsed text (basic mode) and write the following expression:
CLONE - %{issue.summary}
Choose Parsed text (advanced mode) and write the following expression:
null
Select From current issue and All remaining fields
Add a Relates to issue link and link it to the current issue
Tick Store issue keys
Issues to be created
Choose Multiple issues
Enter the following parser expression with parsing mode set to Issue list
issuesUnderEpic()
Choose Parser expression (standard issue type) and use the following expression:
^%{issue.issueType}
Enter the following expression with parsing mode set to Advanced text
^%{issue.summary}
Enter the following expression with parsing mode set to Advanced text
^%{issue.description}
Update the following fields
Choose Parsed text (advanced mode) and write the following expression:
null
Choose Field in current issue and Ephemeral String 3
Choose Parsed text (advanced mode) and write the following expression:
^%{issue.key}
Select From seed issue and All remaining fields
Tick Store issue keys
Issues to be created
Choose Multiple issues
Enter the following parser expression with parsing mode set to Text list
toStringList(toString(textOnStringList(toStringList(replaceFirst(%{00063}, "^([^,]+,\\s)", ""), ","), toString(textOnStringList(fieldValue(%{issue.cfTemplateIssue}, issueKeysToIssueList(^0%)), findModify(toString(subtasks(^1%)), "[^, ]+",^0% + ":" + ^2%))))), ",")
Choose Selected issue type and select Sub-task
Select Set parent manually (parser expression) and use the following expression.
replaceFirst(^%, ":.*$", "")
Enter the following expression with parsing mode set to Advanced text
toString(fieldValue(%{00000}, issueKeysToIssueList(replaceFirst(^%, "^.*:", ""))))
Enter the following expression with parsing mode set to Advanced text
toString(fieldValue(%{00001}, issueKeysToIssueList(replaceFirst(^%, "^.*:", ""))))
Update the following fields
Choose Parsed text (advanced mode) and write the following expression:
toString(fieldValue(%{00003}, issueKeysToIssueList(replaceFirst(^%, "^.*:", ""))))
Choose Parsed text (advanced mode) and write the following expression:
first(fieldValue({00012}, issueKeysToIssueList(replaceFirst(^%, "^.*:", ""))))
In this case we cannot use the Inherit field values parameter in the post-function for the creation of sub-tasks. Instead, we must use a different expression for each field that we want to copy into sub-task's clones. The expressions to be used are the following ones.
For Number and Date-Time fields:
first(fieldValue({issue.cfTemplateIssue}, issueKeysToIssueList(replaceFirst(^%, "^.*:", ""))))
For the rest of the fields:
toString(fieldValue(%{issue.cfTemplateIssue}, issueKeysToIssueList(replaceFirst(^%, "^.*:", ""))))
If you still have questions, feel free to refer to our support team.
Powered by Atlassian Confluence 8.5.18, themed by Refined 7.6.7 and Decadis AG