How to set the due date of a story based on it's epic due date

Zsigmond Molnar April 2, 2024

Hi,

I want to create an epic and stories using automation rules.

Additionally, I want to set the due date of the story based on the due date of the epic.

(e.g.: story’s due date = epic’s due date + 10 business days)

 

Could you please assist me in configuring the automation rule correctly?

 

I tried the following scenarios:

 

Option #1

Due date field:

  • {{issue.dueDate}}                                              --> It doesn’t work
  • {{issue.dueDate.plusBusinessDays(5)}}             --> It doesn’t work

 

 

More options --> additional fields:

Option #2 --> It works

    releaseStartDate (variable) = {{now}}

 

    {

      "fields": {

        "dueDate": "{{releaseStartDate}}" }}

 

 

Option #3 --> It doesn’t work

    releaseStartDate (variable) = {{now}}

    {

    "fields": {

        "dueDate": "{{releaseStartDate.plusBusinessDays(10)}}"   }}

 

 

Option #4 --> It doesn’t work

     releaseStartDate (variable) = {{issue.dueDate}}

 

    {

    "fields": {

        "dueDate": "{{releaseStartDate.plusBusinessDays(10)}}"

 

   Setting of storys due date.png}}

 

1 answer

1 accepted

0 votes
Answer accepted
Kalyan Sattaluri
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.
April 2, 2024

Hello @Zsigmond Molnar 

When referencing fields in smart values, if you want to use display name, you have to be careful and specify exactly how its shown on the screen.

For example, correct syntax is: {{issue.Due Date.plusBusinessDays(5)}} 

As its shown on the screen. It takes the space as well.

Hope it helps.

Kalyan Sattaluri
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.
April 2, 2024

BTW, couple of other suggestions looking at your rule screenshot:

- When trigger is "Issue created", always a good idea to put in "Refetch Issue" action after the trigger. That way, when you are referencing values of the trigger issue, system had time to update the SOR and have values at hand to compare.

- Always a good idea to use as many log action statements as you can capturing smart values so you dont have to edit issues to know its going to work.

Just some friendly suggestions. Hope you dont mind. Thanks!

Zsigmond Molnar April 2, 2024

Hello @Kalyan Sattaluri 

 

Thank you for your suggestion.

I changed the automation rule accordingly, but unfortunately the due date fields is still empty.

 

Do you hae any further idea what do I have to change?

 

 

Setting of storys due date 2.png

 

Kalyan Sattaluri
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.
April 2, 2024

Couple of things:

Before your "Create Variable", you are editing Due Date on the Epic. What are you doing there? Are you assigning a Due date to the epic? 

Please add a refetch step after you are editing the epic's due date.

Also, what date are you putting as Due Date for Epic. You can just add 5 business days to it instead of referencing Epic's due date..

Also, as mentioned, log {{issue.Due Date.plusBusinessDays(5)}}  before creating new story to confirm value exists..

 

 

Zsigmond Molnar April 2, 2024

Hello @Kalyan Sattaluri 

 

It works perfectly.

I'm very grateful for all you have done to help me!

 

Best regards,

Zsigmond Molnar

Like Kalyan Sattaluri likes this

Suggest an answer

Log in or Sign up to answer