Skip to content

[8.19] [Response Ops][Reporting] Report UI should only show reports generated in the current space. (#221375)#223002

Merged
ymao1 merged 1 commit intoelastic:8.19from
ymao1:backport/8.19/pr-221375
Jun 6, 2025
Merged

[8.19] [Response Ops][Reporting] Report UI should only show reports generated in the current space. (#221375)#223002
ymao1 merged 1 commit intoelastic:8.19from
ymao1:backport/8.19/pr-221375

Conversation

@ymao1
Copy link
Contributor

@ymao1 ymao1 commented Jun 6, 2025

Backport

This will backport the following commits from main to 8.19:

Questions ?

Please refer to the Backport tool documentation

…d in the current space. (elastic#221375)

Resolves elastic#219881

## Summary

* Saves `space_id` in the report source document when a report is
generated.
* Updated the `list` API to filter by `space_id` (if available). The
filter also includes documents where `space_id` is not populated in
order to maintain backwards compatibility with old reports that don't
include the `space_id` field. This is an internal API so this change
should be allowed.
* Associated Elasticsearch PR to add `space_id` to the report index
mapping: elastic/elasticsearch#128336

## To Verify
* On `main`, generate reports in different spaces
* Switch to this branch and generate more reports in different spaces
* Verify that you only see the new reports generated in the current
space + the old reports generated on `main` with no space id.

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

# Conflicts:
#	x-pack/platform/plugins/private/reporting/server/routes/common/jobs/jobs_query.test.ts
@ymao1 ymao1 requested a review from kibanamachine as a code owner June 6, 2025 14:13
@ymao1 ymao1 added the backport This PR is a backport of another PR label Jun 6, 2025
@ymao1 ymao1 enabled auto-merge (squash) June 6, 2025 14:13
Copy link
Contributor

@pmuellr pmuellr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@ymao1 ymao1 merged commit bd41f18 into elastic:8.19 Jun 6, 2025
11 checks passed
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.

2 participants