Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Set Start Date and Due Date of newly created Sub-task Ticket

Bernd W Neumann March 20, 2025

Hi!

I am creating subtasks and need to set the start date and due date with an offset to today. How can I do that with JWT?

Kind regards

Bernd

1 answer

0 votes
Pasam Venkateshwarrao
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
March 20, 2025

Hi @Bernd W Neumann 

Welcome to the community,

This requirement of your was a nice exercise for me! It was a bit tricky to accomplish that, but everything turns out great! You can create the following rule which I'll explain just below:

rule001.png

 

  • Starting off, you create your trigger to which you select "Due date" and only for the edit operation.
  • Next you should add a condition about this rule continuing only if the issue type is task (you don't want this to get triggered for Epic or subtasks)
  • Then you create a variable called "difference" or whatever else you choose and in that you type the below smart value, which will give you the difference number of days for the changed field.
{{fieldChange.fromString.toDate.diff(fieldChange.toString.toDate).days}}

rule002.png

 

  • After that you create your branch and you choose "For Sub-tasks"
  • Then you add an Edit Issue component and you select your two fields, Start and Due date
  • Then you paste as a value the following:
    • {{issue.Start date.plusDays(difference.asNumber)}}
    • {{issue.Due date.plusDays(difference.asNumber)}}

rule003.png

 

Some things to take into account:

  • If the subtasks have values but your task does not, then changing the values from the task, will erase the values from your subtask. So be careful with that
  • Take a look at that @Tessa Tuteleers wrote about the business days. Increasing or decreasing days without taking into account weekends, can result in having a Start or Due date falling into a weekend. To avoid that try on the Edit Issue component to replace plusDays with plusBusinessDays

Hope this helps

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
SERVER
VERSION
9.12.15
TAGS
AUG Leaders

Atlassian Community Events