Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.


Panel

On this page

Table of Contents
maxLevel2
exclude(On this page|Use case).*
stylecircle
typeflat
separatorpipe



UI Text Box
sizemedium
typeinfo

Use case

Clone an epic, the tasks under the epic and the sub-tasks of these tasks.


Prerequisites

UI Expand
titleSet up a custom field


UI Steps


UI Step

Create a Text (single line) custom field

Name: Template Issue








Configuration

UI Steps


UI Expand
titleAdd the first Create issue post function


UI Steps


UI Step
Add a Create issue post function to the desired workflow transition.


UI Step

Issue to be created

UI Steps


UI Step

Mode

Choose Single issue



UI Step

Issue type

Choose Parser expression (standard issue type) and write the following expression:


Code Block
languagebash
linenumberstrue
%{issue.issueType}




UI Step

Summary

Enter the following expression with parsing mode set to Basic text

Code Block
languagebash
linenumberstrue
CLONE - %{issue.summary}




UI Step

Additional options

Update the following fields

UI Steps


UI Step

Epic Name

Choose Parsed text (basic mode) and write the following expression:

Code Block
languagebash
linenumberstrue
CLONE - %{issue.summary}



UI Step

Resolution

Choose Parsed text (advanced mode) and write the following expression:

Code Block
languagebash
linenumberstrue
null








UI Step

Copy remaining fields

Select From current issue and All remaining fields


UI Step

Add a Relates to issue link and link it to the current issue


UI Step

Additional options

Tick Store issue keys




UI Expand
titleAdd a second Create issue post function


UI Steps


UI Step
Add another Create issue post function after the previous post function in the same workflow transition.


UI Step

Issues to be created


UI Steps


UI Step

Mode

Choose Multiple issues


UI Step

Expression

Enter the following parser expression with parsing mode set to Issue list

Code Block
languagebash
linenumberstrue
issuesUnderEpic()



UI Step

Issue type

Choose Parser expression (standard issue type) and use the following expression:


Code Block
languagebash
linenumberstrue
^%{issue.issueType}



UI Step

Summary

Enter the following expression with parsing mode set to Advanced text

Code Block
languagebash
linenumberstrue
^%{issue.summary}



UI Step

Description

Enter the following expression with parsing mode set to Advanced text

Code Block
languagebash
linenumberstrue
^%{issue.description}





UI Step

Additional options

Update the following fields

UI Steps



UI Step

Resolution

Choose Parsed text (advanced mode) and write the following expression:

Code Block
languagebash
linenumberstrue
null



UI Step

Choose Field in current issue and Ephemeral String 3


UI Step

Template issue

Choose Parsed text (advanced mode) and write the following expression:

Code Block
languagebash
linenumberstrue
^%{issue.key}








UI Step

Copy remaining fields

Select From seed issue and All remaining fields


UI Step

Additional options

Tick Store issue keys






UI Expand
titleAdd a second Create issue post function


UI Steps


UI Step
Add another Create issue post function after the previous post function in the same workflow transition.


UI Step

Issues to be created


UI Steps


UI Step

Mode

Choose Multiple issues


UI Step

Expression

Enter the following parser expression with parsing mode set to Text list

Code Block
languagebash
linenumberstrue
toStringList(toString(textOnStringList(toStringList(replaceFirst(%{00063}, "^([^,]+,\\s)", ""), ","), toString(textOnStringList(fieldValue(%{issue.cfTemplateIssue}, issueKeysToIssueList(^0%)), findModify(toString(subtasks(^1%)), "[^, ]+",^0% + ":" + ^2%))))), ",")


UI Text Box
typenote
Replace the field code %{issue.cfTemplateIssue} with the field code of the Template Issue field in your instance.



UI Step

Issue type

Choose Selected issue type and select Sub-task


UI Step

Parent issue

Select Set parent manually (parser expression) and use the following expression.

Code Block
languagebash
linenumberstrue
replaceFirst(^%, ":.*$", "")



UI Step

Summary

Enter the following expression with parsing mode set to Advanced text

Code Block
languagebash
linenumberstrue
toString(fieldValue(%{00000}, issueKeysToIssueList(replaceFirst(^%, "^.*:", ""))))



UI Step

Description

Enter the following expression with parsing mode set to Advanced text

Code Block
languagebash
linenumberstrue
toString(fieldValue(%{00001}, issueKeysToIssueList(replaceFirst(^%, "^.*:", ""))))






UI Step

Additional options

Update the following fields

UI Steps


UI Step

Assignee

Choose Parsed text (advanced mode) and write the following expression:

Code Block
languagebash
linenumberstrue
toString(fieldValue(%{00003}, issueKeysToIssueList(replaceFirst(^%, "^.*:", ""))))



UI Step

Due date

Choose Parsed text (advanced mode) and write the following expression:

Code Block
languagebash
linenumberstrue
first(fieldValue({00012}, issueKeysToIssueList(replaceFirst(^%, "^.*:", ""))))



UI Text Box
typeinfo

In this case we cannot use the Inherit field values parameter in the sub-tasks creation post-function. Instead of it, we have to use an expression for each field that we want to copy into sub-task's clones. The expressions to be used is the following ones.

For Number and Date-Time fields:

Code Block
languagebash
linenumberstrue
first(fieldValue({issue.cfTemplateIssue}, issueKeysToIssueList(replaceFirst(^%, "^.*:", ""))))


For the rest of the fields:

Code Block
languagebash
linenumberstrue
toString(fieldValue(%{issue.cfTemplateIssue}, issueKeysToIssueList(replaceFirst(^%, "^.*:", ""))))











Related use cases

Page properties report
firstcolumnUse case
headingsJWT feature, Workflow function, Parser functions, Label
sortByTitle
cqllabel in ("use-case-workflow","parser_func_tostring","parser_func_tostringlist","parser_func_issuekeystoissuelist","parser_func_replaceFirst","parser_func_first","parser_func_fieldvalue","parser_func_textonstringlist","parser_func_findmodify","parser_func_subtasks") and ancestor = "27066752"


Excerpt Include
DECADIS:Contact support
DECADIS:Contact support
nopaneltrue


Page properties
hiddentrue




Page properties
hiddentrue



Status
Tech review

Status
titletodo

Style guide

Status
titletodo

Status
titletodo
Status
colourYellow
titleReady for review
Status
colourGreen
titledone
Status
colourRed
titleflagged