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

Create automatically a sub-task under the parent of a sub-task that has just been closed, increase a number in the summary of the new sub-task and copy all the fields, attachments and comments from the previous sub-task.


Prerequisites

UI Expand
titleSet up custom fields


UI Steps


UI Step

Create a Select list (single choice) custom field

Name: Create next versionanother sub-task

Options: Yes and No





Configuration

UI Steps


UI Step
Add a Create issue post function to the final transition of the sub-tasks workflow.


UI Step
Issues to be created


UI Steps


UI Step

Mode

Choose Single issue.


UI Step

Issue type

Choose Selected issue type


UI Step

Specific issue type

Choose Sub-task.


UI Step

Parent issue

Choose Current issue.Select parent manually (parser expression) and add the following expression manually in Issue list mode:

Code Block
languagebash
linenumberstrue
issueKeysToIssueList(%{parent.key})





UI Step

Summary

Enter the following expression with the expression editor in Advanced text mode:

Code Block
languagebash
linenumberstrue
findReplaceFirst(%{issue.summary}, first(findPattern(%{issue.summary}, "[0-9]+")) , toString(sum([toNumber(first(findPattern(%{issue.summary}, "[0-9]+"))), 1])) )


UI Text Box
typenote

This expression will update the first number written in the summary in the newly created issue, adding one to the first number of the summary of the issue that triggered the transition.

If you are not going to add a number at the beginning of the expression, such as in the summary "Version 1 - Summary", you should not add this expression. The previous summary would be converted to "Version 2 - Summary" in the next sub-task.



UI Step

Description

Enter the following expression to inherit the description of the parent of the sub-task.

Code Block
languagebash
linenumberstrue
%{issueparent.description}



UI Step

Copy remaining fields

Select From current issue and check all of the options of the checkbox.


UI Step

Conditional execution

Add the following expression for the conditional execution :after replacing the field code %{issue.cfaaaaa} with the one for the Create another sub-task field.

Code Block
languagebash
linenumberstrue
%{issue.issueType} = "Sub-task" and %{issue.cfaaaaa} = "Yes"




Related use cases

Page properties report
firstcolumnUse case
headingsJWT feature, Workflow function, Parser functions, Label
sortByTitle
cqllabel in ("use-case-workflow","parser_func_findreplacefirst","parser_func_findpattern","parser_func_first","parser_func_sum","parser_func_tostring","parser_func_tonumber") and ancestor = "27066752"


Excerpt Include
DECADIS:Contact support
DECADIS:Contact support
nopaneltrue


Page properties
hiddentrue


JWT feature

Workflow function

Create issue

Parser functionsfindReplaceFirst() first() findPattern() toString() sum() toNumber()
Label



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


...