Automate End date of an issue from Original Estimate & Start Date

Sucharitha Revanuru February 3, 2023

Hi @Trudy Claspill I'm back again with another rule: 

I created a rule to add two fields Start Date (customfield_10015) and Original Estimate field (timeoriginalestimate), and to get the value in to third field which is End date field (customfield_10042), although rule executed successfully, the end field is still empty. I followed exactly step by step, however for a different field which is End Date from this help Automate Due date of an issue from Original Estimate | Atlassian Cloud | Atlassian Documentation

- the End field remains blank despite the rule is success. See the screenshot below: 

First Rule: Create variable to store the time tracking estimate in business days when issue is created using the below query:

{{#=}}{{issue.timetracking.originalEstimateSeconds}} / (60 * 60 * 8){{/}}

Second Rule: When the issue is transitioned from Backlog to Selected for development, with the Edit issue action as follows: 

Rule in Edit Issue.png

Formula: {{issue.Start date.plusBusinessDays(TimeTrackingDays.asNumber).jiraDate}}

After execution (See the Audit log below); 

Audit log.png

 

End date is still blank (see below): 

End Date Blank.png

Would you please let me know what could have gone wrong? 

Thanks

1 answer

1 vote
Trudy Claspill
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
February 3, 2023

Hello @Sucharitha Revanuru 

Try using a Log action to print to the Audit Log the value of the following items to confirm that they are what you expect:

  1. the original estimate 
  2. the Start Date
  3. your variable TimeTrackingDays
  4. the smart value that you are attempting to assign to End Date.
Sucharitha Revanuru February 3, 2023

Thanks for your reply, is this right way to do it? 

{{issue.Startdate}}, {{issue.timetracking.originalestimate}},{{TimeTrackingDays}},{{issue.Start date.plusBusinessDays(TimeTrackingDays.asNumber).jiraDate}}Add value to audit log.png

Trudy Claspill
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
February 3, 2023

You can do it that way or you could put each value in a separate Log action and include any static text you wish to add to the log.Screen Shot 2023-02-03 at 2.47.18 PM.pngScreen Shot 2023-02-03 at 2.47.34 PM.png

Sucharitha Revanuru February 3, 2023

Executed, see the log below: Add value to audit log_2.png

Like Juan Sebastian Quintero likes this
Sucharitha Revanuru February 3, 2023

Just checked the issue, looks like it returned the values in the fields, and I could see End Date field being updated, isn't it! it worked!.png

Trudy Claspill
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
February 3, 2023

It does appear that the automation is working.

Like Sucharitha Revanuru likes this
Sucharitha Revanuru February 3, 2023

Thanks so much :-)

Bill Sheboy
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.
February 4, 2023

I just noticed in this rule...

Things like .jiraDate help with formatting the output.  I would recommend not using them to set an actual date or date/time field.  One or more of the human-readable formats could product an ambiguous value if a rule or JQL tries to use it later as a date.

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
PREMIUM
PERMISSIONS LEVEL
Site Admin
TAGS
AUG Leaders

Atlassian Community Events