Forums

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

I want to create an automation to calculate time logged when a user closes an issue.

Charlie Wright August 28, 2024

This is my first automation using smart time values; I want to create an automation to calculate time logged as the difference between when the issue is created and when it is closed. Background - these are typically 5-10 minutes tasks. So, the trigger is when the issue is transitioned to Done:

Date started: {{issue.created}}

Time spent: {{now.diff(issue.created).minutes}}

Work description: Completed {{issue.key}}

 

Wheat am I doing wrong here? Thanks.

1 answer

1 vote
Trudy Claspill
Community Champion
August 28, 2024

Hello @Charlie Wright 

Welcome to the Atlassian community.

When asking for help with an automation it will help us help you if you provide the following:

1. Screen images showing your entire rule and the details of each step.

2. The details from the rule execution log

3. A description in your words of how the results don't match your expectations.

 

Is the information you provide the entries for a Log Work action?

Do you get a new worklog entry on the issue? If you do, what value is being shown for time spent?

Charlie Wright August 29, 2024

Screenshot 2024-08-29 082346.pngScreenshot 2024-08-29 082445.png

Charlie Wright August 29, 2024

The result I am seeking is a time entry for work performed on the issue that is equal to the difference between when the issue was created and when it was closed: issues are reported be end users in Teams, whereupon the support team creates the Jira ticket using the Teams-Jira integration, actions the request, and closes the Jira ticket, all in Teams. Yes, the goal is to move the requests to Jira Service Management but the organization is not ready for that yet.

Charlie Wright August 29, 2024

I have it working now, no further replies needed.

Trudy Claspill
Community Champion
August 29, 2024

Can you share your solution so others can learn from your experience? If you create a separate Answer thread you can also Accept your own Answer to mark your question as Solved. That helps others find posts with verified solutions.

Like Walter Buggenhout likes this

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