Graylog2 / Graylog2/graylog2-server

Deleting Dashboard or Saved Searches marked as favorites causes entity problem

Open
#16,774 4 comments 0 reactions 1 assignee Claimed by @dennisoelkers View on GitHub
bug to-verify
Dominant language
Java
Stars
8.1k
Forks
1.1k
Avg merge
1d 20h
Merged PRs (30d)
217

Description

When you have Dashboards or saved searches linked to favorites, if a service updates a dashboard like an upgrade in illuminate or someone just deletes their saved search that have been marked as favorites it creates an "entity does not exist" issue.
## Expected Behavior
If an entity is marked for favorites and the entity is deleted, we should warn that needs to be removed from favorites and not allow the deletion, or we automatically remove the entity as well from favorites not creating a problem that requires the REST API to remove it.

## Current Behavior
Save a search, add it to favorites, then delete the search
Save a dashboard, add it to favorites, then delete the dashboard.
![image](https://github.com/Graylog2/graylog2-server/assets/77077803/6f8dc6a7-0d61-4c3a-ada4-237aeee884ff)

## Possible Solution
Warn on removal of an entity in favorites or possibly delete it from favorites.

## Steps to Reproduce (for bugs)
as above

## Context
UI should not allow removal of an entity that ends up staying in some other portion of config.

## Your Environment

* Graylog Version: 5.1.5
* Java Version: 17
* OpenSearch Version: 2.6
* MongoDB Version: 6.0
* Operating System: Linux /Docker
* Browser version: All

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.