You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The PR switches party-change redirects to the access-management endpoint accessmanagement/api/v1/reportee/changeandredirect, changes the query parameters to partyId + goTo, adds an buildAccessManagementBaseUrl helper, updates buildArbeidsflateRedirectUrl to use the new base, and updates tests to assert the new URL format.
Changes
Redirect Endpoint Migration
Layer / File(s)
Summary
Helper src/utils/urls/urlHelper.ts
Add buildAccessManagementBaseUrl(altinnHost) to construct https://am.ui.${altinnHost}/.
Core Implementation src/utils/urls/urlHelper.ts
redirectAndChangeParty(goTo, partyId) now returns accessmanagement/api/v1/reportee/changeandredirect URL with partyId and encoded goTo (replaces ui/Reportee/ChangeReporteeAndRedirect and R).
Wiring / Consumer src/utils/urls/urlHelper.ts
buildArbeidsflateRedirectUrl updated to use extractAltinnHost(host) and to prefix the result with the access-management base URL (${amBaseUrl}${redirectAndChangeParty(targetUrl, partyId)}). Comment updated.
Tests src/utils/urls/urlHelper.test.ts
Updated expected URLs in returnUrlToArchive() tests (both "without dialogId" and "with dialogId") to the new am.ui.<host>/accessmanagement/api/v1/reportee/changeandredirect format with partyId and encoded goTo.
Estimated code review effort
🎯 2 (Simple) | ⏱️ ~10 minutes
🚥 Pre-merge checks | ✅ 4 | ❌ 1
❌ Failed checks (1 warning)
Check name
Status
Explanation
Resolution
Docstring Coverage
⚠️ Warning
Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%.
Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name
Status
Explanation
Title check
✅ Passed
The title clearly and specifically describes the main change: migrating to new A3 endpoints for reportee change and redirect functionality.
Linked Issues check
✅ Passed
Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check
✅ Passed
Check skipped because no linked issues were found for this pull request.
Description check
✅ Passed
The pull request description follows the required template structure with all major sections completed, including a clear explanation of changes, related issue link, and verification/QA checklist items marked.
✏️ Tip: You can configure your own custom pre-merge checks in the settings.
✨ Finishing Touches📝 Generate docstrings
Create stacked PR
Commit on current branch
🧪 Generate unit tests (beta)
Create PR with unit tests
Commit unit tests in branch feat/use-new-a3-endpoint-for-redirect
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.
The reason will be displayed to describe this comment to others. Learn more.
Tested ok! ✅
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
backportThis PR should be cherry-picked onto older release brancheskind/otherPull requests containing chores/repo structure/other changes
2 participants
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.
Description
This PR updates how navigation back to the inbox is handled by switching to the new endpoint available in Altinn 3.
The change ensures alignment with the updated access management flow and replaces the previous endpoint with the new, supported alternative.
The new endpoint was introduced here:
Altinn/altinn-access-management-frontend#2167
Test App
This build can be testet with the app "redirect-inbox-simple-app".
https://altinn.studio/repos/ttd/redirect-inbox-simple-app
TT02
https://ttd.apps.tt02.altinn.no/ttd/redirect-inbox-simple-app/#/instance/51432356/804fd79a-58f7-4bb2-9174-a2e3aacc27c1/Task_1/Side1
Related Issue(s)
Verification/QA
kind/*andbackport*label to this PR for proper release notes groupingSummary by CodeRabbit
Tests
Refactor