Versions Compared

Key

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


Panel

On this page

Table of Contents
maxLevel3
exclude(On this page).*
stylecircle
typeflat
separatorpipe



UI Text Box
sizemedium
typeinfo

Use case

<Use case description>

Image RemovedPrerequisites

Creating repetitive issues might be time-consuming work, especially when done on a daily basis. This post function can be used for pre-configuring sub-tasks.

Each time the transition is executed, all needed sub-tasks will be created depending on the selected values in a checkbox field

UI Expand
titleSet up custom fields
UI Steps
UI Step

Create a multi-line text custom field

Name: Status Update

UI Step

Create a multi-line text custom field

Name: Current status

UI Step

Create a multi-line text custom field

Name: Status History

UI StepGo to the Field configuration and set the renderer of the 3 custom fields to "Wiki Style Renderer"

.


Once set up, the validator should look something like this:

SCREENSHOT

UI Expand
titleSet up workflow validatorShould I use a workflow post function or an automation rule?


Message to show when validation fails

UI Text Box
typetip

When to use this workflow post function and when to use an automation rule?

This use case is very useful, if repetitive issues have to be created in only one project or workflow. Then a post function is the easier way to go.

But if this setup is needed for several projects, the Create issue action would make more sense.  In this case you might want to check out our corresponding automation use case.

UI Steps
UI Step

Add to the newly created transition the Fields required or changed validator.

UI Step

Field*

Status Update

UI Step

Condition*

Is required

UI Step
Code Block
Please enter a status update!
UI Step



Configuration

Expression*

Set it to Advanced and use the following expression

UI Steps


UI Step

Add an Create issue post function to the workflow transition you want. The Create issue transition might here the best choice, though. 

When added to the Create issue transition, the post function will be automatically executed each time an issue is created.

Target issue*

Choose Current issue


Status History field

UI Step

Current Status fieldIssues to be created

UI Steps


UI Step
Field

Mode*

Choose Multiple issuesChoose Current Status


UI Step

Expression*

Set it to Advanced and use

Enter the following parser expression


Code Block
languagebash
linenumberstrue
"*" + dateTimeToString({system.currentDateTime}, "yyyy-MM-dd", USER_LANG) + "* - *" + %{system.currentUserFullName} + "*\n" + %{issue.cfnnnnn}
UI Text Box

%{issue.cfnnnnn} is the field code for the field Status Update

UI Step
UI Steps
UI Step

Field*

Choose Status History

UI Step
Code Block
linenumberstrue
%{issue.cfaaaaa} + "\n\n" + %{issue.cfbbbbb}
UI Text Box

%{issue.cfaaaaa} is the field code for the field Current Status

%{issue.cfbbbbb}is the field code for the field Status History

UI Step

Status Update field

UI Steps
UI Step

Field*

Choose Status Update

UI Step

Value*

Choose Clear field value

UI Step

User*

Choose Current user

UI Expand
titleAnother step
UI Steps UI Step UI Step UI Step
toStringList(%{issue.cfnnnnn})
# Replace field code with the field code of your custom field. Use the field dropdown to automatically insert the field code.
# You might want to use a checkbox or select custom field.


with parsing mode set to String List


UI Step

Issue type*

Choose Selected issue type → Sub-task


UI Step

Parent issue*

Choose Current issue




UI Step

Summary*

Enter the following expression

Code Block
languagebash
linenumberstrue
^%
# This is a reference to each value returned by the string list


with parsing mode set to Advanced Text


UI Step

Description

To enrich the issue with further information, you might want to add a short description. It is not mandatory, though.


UI Step

User*

Choose Current user




Screenshots



Screencast



Related use cases

Page properties report
firstcolumnUse case
headingsType,Function, Use case description, Complexity
sortByTitle
cqllabel = "use-case" and ancestor = "27066752"


Excerpt Include
DECADIS:Contact support
DECADIS:Contact support
nopaneltrue


Page properties
hiddentrue


<used to mark a use case as staff pick> Parser hero   

JWT featurelink each symbol to parent page of the function category / e.g. conditions/ validators/automation action...)>

Image Added

Workflow function

<link to function being used>Create issue

Use case description

<Short description of use case>

Create sub-tasks depending on selected values in a custom field (like checkboxes)

LabelLabel
Complexity

Status
colourGreen
titleBeginner
 
Status
titleIntermediate
 
Status
colourYellow
titleadvanced
Status
colourRed
title



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