Hello Community, I am looking to Plot a line chart to compare against 2 time ranges by a specific field.
This is for JIRA metrics.
For example I have 3 fields
Created_time
2020-10-29T03:49:09.000-0700
resolved_time
2021-01-06T15:26:23.000-0800
Ticket:
ABC123
Show a line chart with 2 legends created_time, resolved_time by ticket.
This will help me compare against when a ticket opened vs closed.
Hello @bowesmana.
Thanks for the response.
I will try this logic and see how this works. My y-axis will be count of tickets created vs closed everyday
Actually I am not looking for duration, this report is for management where they will see 2 lines showing the count of tickets created vs closed
Is your x-axis meant to be time, if so, what is your y-axis?
Perhaps you are trying to see duration of ticket, in which case, you could calculate duration by subtracting created from resolved time, e.g.
| eval ct=strptime(Created_time, "%FT%T.%Q%z")
| eval rt=strptime(resolved_time, "%FT%T.%Q%z")
| eval duration=(rt-ct)/86400
which would give you duration in days and then you could use timechart to plot the y-axis duration over the created or resolved time with
| eval _time=ct
| timechart max(duration) by ticket
change _time=rt to get the x-axis as closure time.
Note that timechart will give you 10 tickets, unless you use limit=X
Is that what you are after?