Skip to content

[9.1] [Response Ops][Reporting] Get next run time from task instance in scheduled report list API (#233912)#248074

Merged
ymao1 merged 1 commit intoelastic:9.1from
ymao1:backport/9.1/pr-233912
Jan 7, 2026
Merged

[9.1] [Response Ops][Reporting] Get next run time from task instance in scheduled report list API (#233912)#248074
ymao1 merged 1 commit intoelastic:9.1from
ymao1:backport/9.1/pr-233912

Conversation

@ymao1
Copy link
Copy Markdown
Contributor

@ymao1 ymao1 commented Jan 7, 2026

Backport

This will backport the following commits from main to 9.1:

Questions ?

Please refer to the Backport tool documentation

…eduled report list API (elastic#233912)

Resolves elastic#228059

## Summary

Currently, the `list` API for scheduled reports dynamically calculates
the next run time using the current time and the task rrule schedule.
Sometimes that can lead to discrepancies in the next run that's shown vs
the actual next run date. This PR updates the API to perform a `bulkGet`
on the task instance and use the actual `runAt` time as the next run
time. This should fallback to using the dynamic calculation if there are
any errors getting the task instance.

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
(cherry picked from commit 0eaccf8)

# Conflicts:
#	x-pack/platform/plugins/private/reporting/server/routes/common/scheduled/scheduled_query.test.ts
#	x-pack/platform/plugins/private/reporting/server/routes/common/scheduled/scheduled_query.ts
@ymao1 ymao1 requested a review from kibanamachine as a code owner January 7, 2026 12:44
@ymao1 ymao1 added the backport This PR is a backport of another PR label Jan 7, 2026
@ymao1 ymao1 enabled auto-merge (squash) January 7, 2026 12:44
@elasticmachine
Copy link
Copy Markdown
Contributor

💚 Build Succeeded

Metrics [docs]

✅ unchanged

@ymao1 ymao1 merged commit f744ce1 into elastic:9.1 Jan 7, 2026
16 checks passed
@ymao1 ymao1 deleted the backport/9.1/pr-233912 branch January 7, 2026 15:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport This PR is a backport of another PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants