-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implement restoration of dialogs #1543
Comments
oskogstad
changed the title
feat: Implement restoration of dialogs
Implement restoration of dialogs
Nov 29, 2024
4 tasks
elsand
moved this from New issues
to Backlog
in ⚠️ Dialogporten / Arbeidsflate - GAMMEL - se https://github.com/orgs/Altinn/projects/146 ⚠️
Dec 16, 2024
From refinement:
Se SoftDeletableExtensions |
elsand
moved this from Backlog
to Ready
in ⚠️ Dialogporten / Arbeidsflate - GAMMEL - se https://github.com/orgs/Altinn/projects/146 ⚠️
Jan 8, 2025
Fargekritt
moved this from Ready
to Doing
in ⚠️ Dialogporten / Arbeidsflate - GAMMEL - se https://github.com/orgs/Altinn/projects/146 ⚠️
Jan 9, 2025
Fargekritt
moved this from Doing
to Code Review og PR
in Dialogporten / Arbeidsflate - NY
Jan 16, 2025
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Introduction
This introduces restoration of dialogs in Dialogporten
Description
Dialogs are soft-deleted, and there is a separate "purge" action to hard-delete dialogs from the database. Soft-deletion are however as of now irreversible, but there is need to be able to restore them as the Altinn 3 integration might come into a state where a previously soft deleted instance is restored again.
Implementation
updatedAt
as it was before deletion (opt-out of aggregate handling)/api/v1/serviceowner/dialogs/{dialogId}/actions/restore
204 No Content
, with the existing revision ID in the headernull
)deletedAt
and set theDeleted
flag tofalse
Tasks
Threat modelling
Acceptance criteria
Scenario 1: Restoring a deleted dialog
GIVEN a soft-deleted dialog exists in the system
WHEN a request is made to
/api/v1/serviceowner/dialogs/{dialogId}/actions/restore
THEN the dialog is restored, the
deletedAt
is set tonull
, theDeleted
flag is set tofalse
, and a "restored" Altinn event is generated.Scenario 2: Restoring a non-deleted dialog
GIVEN a dialog exists that is not soft-deleted
WHEN a request is made to
/api/v1/serviceowner/dialogs/{dialogId}/actions/restore
THEN a
204 No Content
response is returned with the existing revision ID in the header.Scenario 3: Retaining system labels
GIVEN a soft-deleted dialog with system labels exists
WHEN the dialog is restored
THEN the system labels remain unchanged.
Scenario 4: Preserving
updatedAt
GIVEN a soft-deleted dialog exists with a specific
updatedAt
valueWHEN the dialog is restored
THEN the
updatedAt
value remains as it was before deletion, with no changes.Scenario 5: Generating a new revision ID
GIVEN a soft-deleted dialog is restored
WHEN the restoration process completes successfully
THEN a new revision ID is returned in the response header.
The text was updated successfully, but these errors were encountered: