From 202f2958469eaf70b1980dd6b397714367ae309a Mon Sep 17 00:00:00 2001 From: Dayanand Sagar Date: Tue, 14 Apr 2026 11:31:33 -0700 Subject: [PATCH] fix(3485): v1 -> v2 event redirects navigate to the wrong event in the UI --- app/pipeline/events/route.js | 8 +++++++- tests/acceptance/pipeline/events/events-test.js | 7 +++++++ 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/app/pipeline/events/route.js b/app/pipeline/events/route.js index 0c0e253d8..2e8d976aa 100644 --- a/app/pipeline/events/route.js +++ b/app/pipeline/events/route.js @@ -23,7 +23,13 @@ export default Route.extend({ return; } - this.replaceWith('v2.pipeline.events', pipeline.id); + const { event_id: eventId } = this.paramsFor('pipeline.events.show'); + + if (eventId) { + this.replaceWith('v2.pipeline.events.show', pipeline.id, eventId); + } else { + this.replaceWith('v2.pipeline.events', pipeline.id); + } }, setupController(controller, model = {}) { this._super(controller, model); diff --git a/tests/acceptance/pipeline/events/events-test.js b/tests/acceptance/pipeline/events/events-test.js index a59b2b023..6d5c34b0a 100644 --- a/tests/acceptance/pipeline/events/events-test.js +++ b/tests/acceptance/pipeline/events/events-test.js @@ -14,6 +14,13 @@ module('Acceptance | pipelines/:id/events', hooks => { setupApplicationTest(hooks); const BASE_URL = `/v2/pipelines/${PIPELINE_ID}/events`; + const V1_BASE_URL = `/pipelines/${PIPELINE_ID}/events`; + + test('visiting /pipelines/:id/events/:eventId redirects to the same event in v2', async assert => { + await visit(`${V1_BASE_URL}/${DEFAULT_EVENT_ID}`); + + assert.strictEqual(currentURL(), `${BASE_URL}/${DEFAULT_EVENT_ID}`); + }); test('visiting /pipelines/:id/events requires being logged in', async assert => { await invalidateSession();