Skip to content
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

Change activity model and types #858

Closed
7 tasks done
Tracked by #836
elsand opened this issue Jun 17, 2024 · 0 comments
Closed
7 tasks done
Tracked by #836

Change activity model and types #858

elsand opened this issue Jun 17, 2024 · 0 comments
Assignees

Comments

@elsand
Copy link
Member

elsand commented Jun 17, 2024

Introduction

The activity model should be changed to reflect the new dialog aggregate version

Description

Some renames and validation changes should be performed on the dialog activity model. This includes using the model in #851 as performedBy, changing the valid types and chaning the validations

Implementation

The model should look something like this

{
    "createdAt": "2024-01-21T16:41:24.8475550", 
    "performedBy": {
        "actorType": "enduser",
        "actorName": "Ola Nordmann",
        "actorId": "urn:altinn:person:identifier-ephemeral:0676ad6bdf"
    },
    "type": "transmissionOpened",
    "transmissionId": "{{transmissionId-utsending-3}}"
}

Valid types should be:

  • dialogCreated
  • dialogCompleted
  • transmissionOpened
  • information
  • paymentMade
  • signatureProvided

The "description" (localizationtext) property should still be available, but only allowed (and required) if type is "information". The other types should not allow for a textual override, as the type itself should provide a non-ambiguous semantic.

See #851 for performedBy model.

Tasks

Preview Give feedback
  1. 6 of 6
    arealmaas oskogstad

Threat modelling

Preview Give feedback

Acceptance criteria

GIVEN ...
WHEN ....
THEN ...

GIVEN ...
WHEN ....
THEN ...

@elsand elsand added needs consideration Requires additional consideration and removed needs consideration Requires additional consideration labels Jun 17, 2024
@arealmaas arealmaas self-assigned this Jul 23, 2024
arealmaas added a commit that referenced this issue Jul 25, 2024
<!--- Provide a general summary of your changes in the Title above -->

## Description
- Adds validation that ensures Description only can be set if Type is
Information
- Rename values for DialogActivity according to issue
- Fix tests and add migration for the refactor

<!--- Describe your changes in detail -->

## Related Issue(s)

- #858 

## Verification

- [ ] **Your** code builds clean without any errors or warnings
- [ ] Manual testing done (required)
- [ ] Relevant automated test added (if you find this hard, leave it and
we'll help out)

## Documentation

- [ ] Documentation is updated (either in `docs`-directory, Altinnpedia
or a separate linked PR in
[altinn-studio-docs.](https://github.com/Altinn/altinn-studio-docs), if
applicable)

---------

Co-authored-by: Ole Jørgen Skogstad <skogstad@softis.net>
oskogstad added a commit that referenced this issue Jul 31, 2024
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

No branches or pull requests

2 participants