Forums

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

Calculation the time between start date and due date

bartlomiej.jochym
Contributor
January 19, 2024

Hi, I created an automation with smart date and time values,

I want to calculate the time from start date or begin date to end date/(now in automation).

I have created several smart value queries but none of them work.

Any ideas what I should change.

Screenshot 2024-01-19 at 16.27.53.pngScreenshot 2024-01-19 at 16.26.30.pngScreenshot 2024-01-19 at 16.25.52.png

 

1 answer

0 votes
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.
January 19, 2024

When you are inside the branch use {{triggerIssue}} instead of {{issue}} to reference the original tickets data.

Also always good idea to log these smart values outside of branch first referencing {{issue}} first to verify.

Then log the same values inside branch but by using triggerissue reference instead of {{issue}}

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.
January 20, 2024

Hi @bartlomiej.jochym 

Adding to the answer from @Kalyan Sattaluri ...

Would you please explain some things about your rule:

  • Why does this rule move all of the linked issues to Completed when one issue moves to Done?
  • Which issue are you trying to measure for: the trigger issue, the linked issues, or both?
  • For the fields you are using for the measures, what are their types: date, date / time, text, etc.?
  • For the fields you are using for the measures, have you confirmed the smart values for those fields?

 

On the last point, smart values are name, spacing, and case-sensitive.  And often the smart value does not match the displayed field name on the issue views.  The how-to article below helps to identify the correct smart value (and custom field id) for any supported fields for automation rules.

The essential steps are:

  • identify an issue which has your field(s)
  • call a REST API function with a browser to search for your issue:
https://<yourinstanceurl>/rest/api/2/issue/<issuekey>?expand=names
  • search on the page for your field, such as with CTRL-F
    • if you find the field, you will also find the smart value, custom field id, and structure / attributes it has
    • if you do not find the field, it is not supported by automation rules

https://support.atlassian.com/cloud-automation/docs/find-the-smart-value-for-a-field/

 

Kind regards,
Bill

Suggest an answer

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

Atlassian Community Events