On this page
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
Configuration
Add a Create issue post function to the workflow transition of your choice.
Issues to be created
Mode
Choose Multiple issues.
Expression
Write an expression using this format with parsing mode in Number.
getMatchingValue(%{issue.cfFrequency}, ["Monthly", "Quarterly", "Half-yearly", "Yearly"], [12, 4, 2, 1])
Issue type
Choose Sub-task
Parent issue
Choose Current issue
Summary
"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)
Deadline
Set the field Deadline
addMonths({system.currentDateTime}, (^) * getMatchingValue(%{issue.cfFrequency}, ["Monthly", "Quarterly", "Half-yearly", "Yearly"], [1, 3, 6, 12]), LOCAL)
Conditional execution
Add a conditional execution to avoid executing the rule with the sub-tasks if they share the workflow with the parent task.
%{issue.issueType} = "Task"
Related use cases
If you still have questions, feel free to refer to our support team.