Skip to content

Apply URL overrides to saved searches#25051

Merged
linuspahl merged 9 commits intomasterfrom
issue-25028
Mar 3, 2026
Merged

Apply URL overrides to saved searches#25051
linuspahl merged 9 commits intomasterfrom
issue-25028

Conversation

@linuspahl
Copy link
Copy Markdown
Contributor

@linuspahl linuspahl commented Feb 18, 2026

Please note, this PR needs to be backported.

Description

This bugfix ensures that opening a saved search with URL overrides (for example ?q=new-query) executes with the overridden values and keeps the override as transient UI state until the user explicitly saves.

Problem
When opening a saved search URL with overrides, the UI could reflect the override while initial execution still ran with the saved search query.

Root Cause
Applying URL overrides without creating a new search in the backend could still execute against the original saved-search context.

What Changed
URL-bound query updates now create a new search which takes the URL query params into account.

Behavior After Fix

  • Opening /search/?q=new-query executes with new-query.
  • URL synchronization still appends missing range parameters.
  • Changes remain transient until explicit Save.

How has this been tested?
I tested different scenarios how to load a search and checked the network requests, search bar values and search results. I also added unit and e2e tests for this bugfix.

Fixes #25028
/prd https://github.com/Graylog2/e2e-tests/pull/1510

@linuspahl linuspahl changed the title Apply URL overrides to saved searches as transient state Apply URL overrides to saved searches Feb 20, 2026
}

const newSearch = view.search.toBuilder().queries([newQuery]).build();
const newSearch = await createSearch(view.search.toBuilder().newId().queries([newQuery]).build());
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

@linuspahl linuspahl added the e2e-tests Run PR build with e2e tests. label Feb 24, 2026
@linuspahl linuspahl marked this pull request as ready for review February 24, 2026 15:02
Copy link
Copy Markdown
Member

@dennisoelkers dennisoelkers left a comment

Choose a reason for hiding this comment

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

Looks good, works well!

@linuspahl linuspahl merged commit 5bc5da0 into master Mar 3, 2026
27 of 28 checks passed
@linuspahl linuspahl deleted the issue-25028 branch March 3, 2026 13:34
garybot2 pushed a commit that referenced this pull request Mar 3, 2026
* Apply URL overrides to saved searches.

* Adding comment

* Adding changelog

* Extend unit tests

(cherry picked from commit 5bc5da0)
garybot2 pushed a commit that referenced this pull request Mar 3, 2026
* Apply URL overrides to saved searches.

* Adding comment

* Adding changelog

* Extend unit tests

(cherry picked from commit 5bc5da0)
garybot2 pushed a commit that referenced this pull request Mar 3, 2026
* Apply URL overrides to saved searches.

* Adding comment

* Adding changelog

* Extend unit tests

(cherry picked from commit 5bc5da0)
linuspahl added a commit that referenced this pull request Mar 3, 2026
* Apply URL overrides to saved searches.

* Adding comment

* Adding changelog

* Extend unit tests

(cherry picked from commit 5bc5da0)

Co-authored-by: Linus Pahl <46300478+linuspahl@users.noreply.github.com>
linuspahl added a commit that referenced this pull request Mar 3, 2026
* Apply URL overrides to saved searches.

* Adding comment

* Adding changelog

* Extend unit tests

(cherry picked from commit 5bc5da0)

Co-authored-by: Linus Pahl <46300478+linuspahl@users.noreply.github.com>
linuspahl added a commit that referenced this pull request Mar 3, 2026
* Apply URL overrides to saved searches.

* Adding comment

* Adding changelog

* Extend unit tests

(cherry picked from commit 5bc5da0)

Co-authored-by: Linus Pahl <46300478+linuspahl@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

e2e-tests Run PR build with e2e tests.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Saved search hyperlink does not execute query correctly

2 participants