The Atlassian Community Forums are currently in read-only mode. We will be relaunching on a new platform on September 22 (read more here). We apologize for the extended downtime. For concerns or questions, please email communitymanagers@atlassian.com. See you on the other side, on the new Atlassian Community Forums! :)

×

Forums

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

How to interpret the MTTR raw data (json) in the database?

Kilian
July 31, 2018

Hello,

i want to do calculations on the MTTR (mean time to resolve) which cant be done by JQL so i searched the value in the DB and saw that it is stored as JSON (see below). Is there an explanation for this? Or are there examples on how to use it in an SQL?

{
   "timeline":{
      "events":[
         {
            "date":1508920800676,
            "types":[
               "START"
            ]
         },
         {
            "date":1508920959597,
            "types":[
               "PAUSE"
            ]
         }
      ]
   },
   "ongoingSLAData":{
      "goalId":86,
      "startTime":1508920800676,
      "paused":true,
      "thresholdData":{
         "calculatedAt":1508920959597,
         "remainingTime":25041079,
         "thresholdsConfigChangeDate":1507531971180,
         "thresholdsConfigChangeMsEpoch":1507531971180
      }
   },
   "completeSLAData":[

   ],
   "metricId":19,
   "definitionChangeDate":1507798977743,
   "definitionChangeMsEpoch":1507798977743,
   "goalsChangeDate":1508411143600,
   "goalsChangeMsEpoch":1508411143600,
   "goalTimeUpdatedDate":1507790885527,
   "goalTimeUpdatedMsEpoch":1507790885527,
   "metricCreatedDate":1507531971180,
   "updatedDate":1508920959862
}

 

2 answers

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

0 votes
jonas.bloeink
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
June 9, 2020

Hi vmishovski,

you can use this query and then in the column "Textvlaue" is the JSON string:

select Top 10 
jiraissue.issuenum, customfield.cfname, customfieldvalue.TEXTVALUE
from jiraissue
inner join customfieldvalue on customfieldvalue.ISSUE = jiraissue.id
inner join customfield on customfield.id = customfieldvalue.CUSTOMFIELD
where cfname like 'MTTR'
;
0 votes
vmishovski
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
June 5, 2020

Hello @Kilian would you share how did you extracted the above?

TAGS
AUG Leaders

Atlassian Community Events