Skip to content

fix(issues): Apply issue search conditions to next/prev event buttons on issue details page#113234

Merged
shashjar merged 2 commits intomasterfrom
shashjar/respect-issue-search-query-for-next-previous-events-issue-details
Apr 17, 2026
Merged

fix(issues): Apply issue search conditions to next/prev event buttons on issue details page#113234
shashjar merged 2 commits intomasterfrom
shashjar/respect-issue-search-query-for-next-previous-events-issue-details

Conversation

@shashjar
Copy link
Copy Markdown
Member

Fixes ID-1257.

The Next/Prev event buttons on the issue details page currently ignore the search query applied on the issue feed, so users walking events end up on ones that don't match their filter. First, latest, and initial-load event all already work.

This PR updates the query path used by next/prev event navigation to ensure that the user's filters/conditions are applied. This new behavior is behind an organization allowlist so I can test in the Sentry org before rolling out fully.

@linear-code
Copy link
Copy Markdown

linear-code bot commented Apr 16, 2026

@github-actions github-actions bot added the Scope: Backend Automatically applied to PRs that change backend components label Apr 16, 2026

if event.group_id:
if options.get("eventstore.adjacent_event_ids_use_snql"):
prev_ids, next_ids = eventstore.backend.get_adjacent_event_ids_snql(
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

In the future we should migrate fully to this other read path, but I believe there are some bugs to work out before this query works as expected. So this PR just fixes the legacy query (which is used everywhere right now) as a fix in the meantime.

Comment thread src/sentry/issues/endpoints/group_event_details.py Dismissed
@shashjar shashjar requested a review from a team April 16, 2026 21:30
@shashjar shashjar marked this pull request as ready for review April 16, 2026 21:30
@shashjar shashjar requested review from a team as code owners April 16, 2026 21:30
@shashjar shashjar removed request for a team April 16, 2026 21:30
@shashjar shashjar merged commit d48d5e0 into master Apr 17, 2026
77 checks passed
@shashjar shashjar deleted the shashjar/respect-issue-search-query-for-next-previous-events-issue-details branch April 17, 2026 16:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Scope: Backend Automatically applied to PRs that change backend components

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants