Forums

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

Time to first response Field

Vineela AK
Contributor
August 18, 2023

Hi,

 

Time to First response is not showing right in my Jira instance. An example :P2 incident received at 4:25PM and responded at 4:27 PM. so the time to first response is 2mins. But in Jira it is not showing as 2mins. It is showing time left. ie 7h 5m.

Any help here would be appreciated.

3 answers

3 votes
Ste Wright
Community Champion
August 18, 2023

Hi @Vineela AK 

The field shows the amount of time left on the SLA, not how long it took between creation and the SLA being met.

You could...

  • Create a custom number field and...
  • Populate it using an Automation rule (based on number of minutes)

Let us know if you need any assistance to create this :)

Ste

Vineela AK
Contributor
August 18, 2023

Thank you @Ste Wright 

 

can you guide me  how to create a custom number field and populate using an automation rule. never tried this so far so seeking your help.

Ste Wright
Community Champion
August 18, 2023

Hi @Vineela AK 

I've assumed this is a Company-managed Project - is that correct?

---

Setup:

There are a few setup steps...

  • Create a custom number field, to capture the minutes in...
    • Go to Settings (cog icon in top-right) > Issues
    • Select Custom Fields from the left-hand menu
    • Press the blue "Create Custom Field" button
    • Choose a "Number Field", and press Next
    • Give it a name and create it - for this example, I've called the field "TTR (Minutes)"
  • Locate the existing Time to First Response SLA field's ID...
    • Back in Custom Fields, search for the field "Time to first response"
    • On the right-hand side of the row, select the breadcrumbs (3-dots icon) > View field information
    • Note the field's ID - it's in the URL, eg. customFieldId=10123

---

Rule:

A few notes on the rule below:

  • There's no trigger for "SLA met" - so you need to recreate the SLA's success criteria. For this example, I've assumed adding a comment meets the SLA, which drives my trigger/condition.
  • The time is printed in milliseconds, so needs to then be calculated into minutes.
  • I've rounded to the nearest minute; showing seconds will show them as a decimal point.
  • You will use the Time to first response's field ID in the Create Variable smart value.

The rule will look something like this...

  • Trigger: Issue Commented
    • Type = All Comments
  • Condition: Advanced Compare Condition
    • First Value = {{issue.comment.size}}
    • Condition = equals
    • Second Value = 1
  • Action: Create Variable
    • Name = milliseconds
    • Smart Value = {{issue.customfield_10123.ongoingCycle.elapsedTime.millis}}
  • Action: Re-fetch issue data
  • Action: Edit Issue
    • Field = TTR (Minutes)
      • Value = {{#=}}ROUND(({{milliseconds}} / 1000 / 60), 0){{/}}

---

This is just an example though, the exact trigger and condition(s) will depend on how your SLA is classed as "met"

Let us know if you need any further help to get this working :)

Ste

Like Jack Richens likes this
Jack Richens May 14, 2024

This is really handy and I've been using this for a little while now. I have, however, noticed that if the ticket is created with an attachment, the automation fails. 
Any idea why this would be ?

Many Thanks

Ste Wright
Community Champion
May 25, 2024

Hi @Jack Richens 

Check the audit log, and see what the error message is.

If you need help on how to rectify it, please provide the error message here :)

Ste

0 votes
Andrea Robbins
Community Champion
February 15, 2025

Hi there,

It seems to be a known issue and Atlassian has a smart value you can use to get this value without having to worry about the math :) 

https://confluence.atlassian.com/jirakb/display-the-actual-time-or-elapsed-time-of-sla-s-using-automation-1252000844.html

0 votes
Kateryna_v_SaaSJet_
Atlassian Partner
October 16, 2023

Hi @Vineela AK 

As an alternative, I suggest you try the simple SLA Time and Report for Jira add-on (developed by my team), free for teams of up to 10 users.

There you can see the Elapsed time for SLA goals (for example, Time to the first response) and the remaining time by clicking on the metrics in the grid report. Filters for reports also do not require knowledge of JQL, which significantly simplifies work.

1.png

Try a 30-day trial and see for yourself the benefits of the application.

Suggest an answer

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

Atlassian Community Events