Skip to content

Commit

Permalink
fix: last seen on date range not inclusive
Browse files Browse the repository at this point in the history
  • Loading branch information
daibhin committed Mar 4, 2025
1 parent 51a775b commit 23673a2
Showing 1 changed file with 7 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -63,14 +63,16 @@ export const errorTrackingIssueSceneLogic = kea<errorTrackingIssueSceneLogicType
return { ...values.issue, ...response }
},
loadClickHouseIssue: async (firstSeen: string) => {
const dateRange = {
date_from: firstSeen,
date_to: values.issue?.last_seen || dayjs().toISOString(),
}
const hasLastSeen = values.issue && values.issue.last_seen
const lastSeen = hasLastSeen ? dayjs(values.issue?.last_seen).add(1, 'minute') : dayjs()

const response = await api.query(
errorTrackingIssueQuery({
issueId: props.id,
dateRange: dateRange,
dateRange: {
date_from: firstSeen,
date_to: lastSeen.toISOString(),
},
customVolume: values.customSparklineConfig,
}),
{},
Expand Down

0 comments on commit 23673a2

Please sign in to comment.