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

In this use case, several sub-task will be created depending on the frequency of time chosen. A different sub-task will be created for every monthly, quarterly, half-yearly or yearly recurring deadline of a whole year. For example, 12 tickets will be created if the task has 12 recurring deadlines, one for every month of the year, and only 2 if the task has 2 internal deadlines, one for every six months, from the current date.


Prerequisites

UI Expand
titleSet up custom fields

Create two custom fields to define the frequency and a base date.

Custom fields

Create a Date Picker field and name it Deadline.

Create a Single Select field and name it Frequency.

Add the following options to the field:

  • Monthly
  • Quarterly
  • Half-yearly
  • Yearly





Configuration

UI Steps


UI Step

Add a Create issue post function to the workflow transition of your choice.


UI Step

Issues to be created

UI Steps


UI Step

Mode

Choose Multiple issues.


UI Step

Expression

Write an expression using this format with parsing mode in Number.

Code Block
languagebash
linenumberstrue
getMatchingValue(%{issue.cfFrequency}, ["Monthly", "Quarterly", "Half-yearly", "Yearly"], [12, 4, 2, 1])



UI Step

Issue type

Choose Sub-task


UI Step

Parent issue

Choose Current issue


UI Step

Summary

Code Block
languagebash
linenumberstrue
"Sub-task with deadline on " + dateToString(addMonths({system.currentDateTime}, (^) * getMatchingValue(%{issue.cfFrequency}, ["Monthly", "Quarterly", "Half-yearly", "Yearly"], [1, 3, 6, 12]), LOCAL), LOCAL, SERVER_LANG)




UI Step

Deadline

Set the field Deadline

Code Block
languagebash
linenumberstrue
addMonths({system.currentDateTime}, (^) * getMatchingValue(%{issue.cfFrequency}, ["Monthly", "Quarterly", "Half-yearly", "Yearly"], [1, 3, 6, 12]), LOCAL)


UI Step

Conditional execution

Add a conditional execution to avoid executing the rule with the sub-tasks if they share the workflow with the parent task.

Code Block
languagebash
linenumberstrue
%{issue.issueType} = "Task"











Related use cases

Page properties report
firstcolumnUse case
headingsJWT feature, Workflow function, Parser functions, Label
sortByTitle
cqllabel in ("use-case-workflow","parser_func_addmonths","parser_func_getmatchingvalue","parser_func_datetostring") and ancestor = "27066752"


Excerpt Include
DECADIS:Contact support
DECADIS:Contact support
nopaneltrue


Page properties
hiddentrue


JWT feature

Workflow function

Create issue

Parser functionsaddMonths() getMatchingValue() dateToString()
Label



Page properties
hiddentrue



Status
Tech review

Status
colourGreen
titletododone

Style guide

Status
colourGreen
titledone

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


...