Skip to content

fix: preserve query params on by_url_identifier redirect - #67

Merged
imenattatra merged 1 commit into
metr-mainfrom
fix/url-identifier-with-param
Jun 4, 2026
Merged

fix: preserve query params on by_url_identifier redirect#67
imenattatra merged 1 commit into
metr-mainfrom
fix/url-identifier-with-param

Conversation

@imenattatra

Copy link
Copy Markdown

Closes https://github.com/metr-systems/backlog/issues/4861

AI Disclaimer: Yes — used Claude Code

Summary

Dashboard links built from the overview in SE dashboards (e.g. /dashboards/by_url_identifier/anlagendetails?p_Liegenschaft=<uuid>) were losing their query parameters during the redirect to the canonical org dashboard URL.

The building UUID got dropped, so the dashboard couldn't open for the correct building.

This fix restores the parameters so overview → details navigation works as intended for the SE team's templates.

Code Strategy

The fix re-appends request.query_string only when present, which preserves every parameter, their order, and existing URL-encoding without parsing/reconstructing. No-param redirects don't regress.

QA

How did you test it? Keep your future self in mind to help debug things later.

  • Unit tests (pytest)
  • E2E Tests (Cypress)
  • Manually (in staging)
  • N/A

@imenattatra imenattatra self-assigned this Jun 3, 2026
@imenattatra
imenattatra merged commit 1fedc70 into metr-main Jun 4, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants