fix(3485): v1 -> v2 event redirects navigate to the wrong event in the UI#1571
Open
fix(3485): v1 -> v2 event redirects navigate to the wrong event in the UI#1571
Conversation
minghay
approved these changes
Apr 15, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Context
When a user visits a v1 pipeline event URL (e.g.
/pipelines/123456/events/98765), thepipeline.eventsparent route'sbeforeModel()hook redirects to the v2 UI by callingthis.replaceWith('v2.pipeline.events', pipeline.id). This targets the v2 events index route, which always resolves to the pipeline's latest event (pipeline.lastEventId) — discarding the originalevent_idfrom the URL.As a result, users land on the wrong event in v2 instead of the one they originally navigated to.
Objective
Preserve the
event_idwhen redirecting from a v1 event URL to v2.The fix reads the
event_idviathis.paramsFor('pipeline.events.show')in the parent route'sbeforeModel()hook (Ember parses all route segments from the URL upfront, so child params are available at this point) and redirects directly tov2.pipeline.events.showwith the same event ID.If no event ID is present (e.g. visiting
/pipelines/:id/eventswithout a specific event), the existing fallback to the latest event is preserved.An acceptance test is added to verify that visiting a v1 event URL redirects to the equivalent v2 URL with the same event ID.
References
screwdriver-cd/screwdriver#3483
License
I confirm that this contribution is made under the terms of the license found in the root directory of this repository's source tree and that I have the authority necessary to make this contribution on behalf of its copyright owner.