-
Notifications
You must be signed in to change notification settings - Fork 2
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 logic in messagebox for copying archived instances #355
Comments
Duplicate of Altinn/altinn-studio#1566. Closing issue. |
Reopening as this is a task to implement it in the messagebox UI. Altinn/altinn-studio#1566 is the epic containing all steps needed to make copy of archived instance behave like in altinn2 |
Comments from first round of testing:
Waiting to verify logic related to button and link until after SBL hot fix. |
Attempting to copy an instance based of a non-existing instanceId result in a 500 error. Should we have any error handling here to control the result code in some way ? |
Managed to find out what it is that is going wrong. The InstanceClient in Core creates a PlatformHttpException if the response from Storage is non successful. I've made a PR to handle it slightly better: |
Description
Copying an archived instance should also be supported for Altinn 3 apps. The view should match the view for ReporteeElements in Altinn 2.
The portal button/link should send the user to the app which performs the instantiation based on existing instance. The App already have a POST endpoint that allows for creating a new instance based on an existing instance. It's needs a GET endpoint that can perform the same logic and then do a redirect to the new endpoint.
Endpoint suggestion:
/{org}/{app}/instances/{instanceId}/copy
Development tasks
Testing
An app with the copy archived instance feature already enabled has been deployed to TT02:
https://ttd.apps.tt02.altinn.no/ttd/copy-instance-tester/
The app can be used by any reportee. One possible confusion is that the app has two form filling steps so you need to submit two forms which are identical. The intent was to test the ExcludeDataType feature, but that's not supported as of now. ExcludedDataFields can be tested, but the deployed app has no excluded fields.
To test "make new instance based on existing instance" create a direct URL based on this template:
https://ttd.apps.tt02.altinn.no/ttd/copy-instance-tester/legacy/instances/{partyid}/{instanceGuid}/copy
Acceptance criteria
Definition of done
Verify that this issue meets DoD (Only for project members) before closing.
The text was updated successfully, but these errors were encountered: