Data model and functionality transformation ECP to Valghalla

Data model and functionality transformation ECP to Valghalla

Below here a table is shown with the identified changes between ECP and Valghalla, based on tasks and user stories

It is a work in progress !!

Data model is shown here: Data model
ECP vs Valghalla UI structure view: https://aarhuskommune-my.sharepoint.com/:x:/g/personal/movk_aarhus_dk/EUm4O-eqCuhNth1XIRnhEhwBGRDTjCBi5Cqe2kflA8m89g?rtime=E223oKNL20g

Another way to view the data is this page Reusable ECP components it also takes its point in the user interface.

Most Jira user stories referenced has subtasks, references to other user stories and links to Figma where mockups of the desired user interface is
Go-to the Jira user story to see them.

 

Transformation:

In general we should remove:

  • CreatedByOld

  • ChangedByOld

When changing / removing / adding an Entity we should also update / review:

  • Automapper

  • EntityConfiguration

  • Schema

  • Modules

Changing from MSSQL to Postgres be aware of:

  • Connection string is different

  • Where model configuration is set to be required and HasDefaultValueSql, the “((1))” value has to be changed to “TRUE”

  • Where model configuration has HasColumnType(datetime) it needs to either be changed to HasColumnType(timestamp) or it needs to be removed, resulting in Postgres type timestamp with time zone

  • Previous migrations has to be deleted and a new will have to be created.
    dotnet ef migrations add InitialCreate --output-dir "C:\dev\Valghalla\Internal application\Kaskelot.Internal.Infrastructure\Migrations\

  • Stopping the PostgresSql engine
    sc stop postgresql-x64-15

  • Starting the PostgresSql engine (is not started)
    sc start postgresql-x64-15

From all data model entities

Action

Name

Link

Data notes

Functionality notes

Action

Name

Link

Data notes

Functionality notes

Remove

Materials
Not needed

 

 

/administration/material
/building/details/

Remove / Repurpose

Courses → Repurpose for Communication templates and the mapping between templates and task types

 

Repurpose CourseEntity
Repurpose CourseOccasionEntity

/course → /Communication

Remove

Rooms
Not needed

 

Remove RoomEntity

/building/details/

Remove

Constituency
Not needed

 

Remove ConstituencyEntity

/administration/structure

Remove

Parish
Not needed

 

Remove ParishEntity

/administration/structure

Remove

Sign

Not needed

 

Remove SignEntity

/building/details/

Remove

Applications
Not needed

 

FieldAlternativeEntity
FieldDataEntity
FieldEntity
FixedFieldEntity
FixedFieldValueEntity
FormEntity
FormFieldEntity
FormPostEntity

Some of this functionality / components might be useful in the communication portion)
Like the RTF component.

Remove

Forms
Not needed

 

 

 

Change

Templates

Not needed

 

 

/administration/templates

  • Repurpose Blob storage reference with configuration and functionality for file repository mapped to a local file storage

Remove

Electorial district
Not needed, will only use District->Area

 

Remove ElectoralDistrictEntity

/administration/structure

Investigate

Tag

 

PersonTagEntity
TagEntity

/administration/category

Decide

Group Type → Team type

 

GroupTypeEntity
has connection to early voting we don’t need.

/administration/category

New

Validation rules

https://os2web.atlassian.net/browse/VALGHAL-131

New entity and table in the data model or as a fixed model (enum or json object) in the code ?
No user should be able to change them.

Reference to a localized string per. entry

  • Show in Election type configuration

  • Use when assigning a task to a user or when a user assigns a task to him/her self

  • Also use when automatically updating the users base data (timer job)

  • No interface for configuration, types are fixed.

New

Election types

https://os2web.atlassian.net/browse/VALGHAL-238

New entity and table in the data model.
ElectionTypeEntity

Reference to the selected validation rules

Show in administration area on same level as election.

New / Change

Special diet (reuse Category if it makes sense)

https://os2web.atlassian.net/browse/VALGHAL-283

New entity and table in the data model
SpecialDietEntity

Perhaps reuse category dialog setup and category card from administration if it makes sense.

New

Election committee contact information

https://os2web.atlassian.net/browse/VALGHAL-111

New entity and table in the data model, see fields in figma link on the individual task.
ElectionContactInformationEntity

Show in administration area on same level as election.

Change

Disctrict → Area

https://os2web.atlassian.net/browse/VALGHAL-107

Add in DistrictEntity data model

  • Description (string)

Rename DistrictEntity to AreaEntity in source code

Move from structure to administration area on same level as election.

Add field for

  • Description (multi line)

Change

Election

https://os2web.atlassian.net/browse/VALGHAL-101

Add in ElectionEntity data model

  • Description (string)

  • Election type reference (guid)

  • Task lock days (int)

  • Election period start date (date no time)

  • Election period end date (date no time)

Change in the entity data model

  • Active / published → change to status model and supply more values, maybe we need to create an enum for this.

Remove in entity data model

  • Constituency dependency

  • Create a wizard for new elections creation

  • Create copy election option

Add fields for

  • Selecting election type (dropdown)

  • Selecting start and end date (calendar for each)

  • Task Lock (default 4 days)
    Supply the default value in the municipal configuration database

New

Election

https://os2web.atlassian.net/browse/VALGHAL-321

 

Automated tasks

  • De-activate election

Bound to communications settings

New

Election

https://os2web.atlassian.net/browse/VALGHAL-110

N/A

All election data except participants is copied to a new election call the same and suffixed with (copy)
Or we could try and reuse the “based on election” functionality.
We need to be able to handle tasks and their date if the election date period is smaller than the one they copy from.
The easiest way of of that is to not touch the date period and then let it be up to the employees to adjust afterwards.

maybe we could write a stored procedure for that ?

New

Automated tasks / job

 

N/A

Known about the daily scheduled task / job

  • Run every 1 day

  • Check election end date

    • if today, deactivate the election.

  • Check person data needs updating

    • Query CPRUpdated - 7 days

    • Queue all found results into the CPR Queue database

    • Another job will pick up the changes.

 

New

CPR (social security job) Automated tasks / job

https://os2web.atlassian.net/browse/VALGHAL-130

Create CPRQueueEntity

  • Id (int)

  • Date (datetime)
    when it was added to the database

  • Social security number (string)

  • Status (string)

    • New

    • Processing

    • Failed

    • Completed

  • RetryCounter (int)

  • Completed date (date)

Create Table CPRQueue

This is not set in stone, it is a suggestion

Known about this scheduled task / job

  • Run every 5 minutes ?

  • Pick up data from CPRQueue,

  • Ask CPR service for data

    • Before asking, mark the CPRQueueEntity status processing

    • If service response is bad, mark the CPRQueueEntity status failed and increment the RetryCounter

    • If the service response is good, update PersonEntity and mark the CPRQueueEntity status completed and set completed date

 

 

This is not set in stone, it is a suggestion

New

Web (Declaration of consent)

https://os2web.atlassian.net/browse/VALGHAL-108

Maybe reuse the WebConfigurationEntity if it makes sense

  • Should be placed under administration

  • Will require Rich text editor implementation, reuse from Web area.

Change

Building->Work location

https://os2web.atlassian.net/browse/VALGHAL-102

Remove binding to Election (this is global)

Add in the BuildingEntity data model

  • List of necessary TaskTypes (reference table)

  • List of necessary Teams (reference table)

  • Work location responsible (user id) (reference table)

Remove in the BuildingEntity data model

  • ElectionId

  • Category

  • Deliveryaddress

  • DeliveryPostal code

  • DeliveryPostal place

  • Freetext

  • Inactive

  • CanExpand

  • InformerNeeded

  • InformationToContactPerson

  • ExternalComment

  • Rooms

  • Signs

  • Materials

  • BuildingEventLog

Rename to BuildingEntity to WorkLocation in source code

Remove BuildingEventLogEntity data model

  • Rename to Work Location

  • Move into to Administration area.

Add fields for

  • Task Types (multi select from all available task types)

  • Teams (multi select from all available teams)

  • Worklocation responsible (list (showing name (link to user) and remove option
    Button to add a new/additional worklocation responsibles

Remove / repurpose fields

  • New worklocation

    • Category

    • Delivery address

    • Delivery Postal code

    • Delivery Postal place

    • Inactive

    • Can expand

    • Informant needed

  • Worklocation details

    • Information to contact person

    • Comment

    • Comments shown on external web

    • Event log

    • Rooms

    • Signs

    • Materials

Change

Function → Task type

https://os2web.atlassian.net/browse/VALGHAL-103

Remove binding to Election (this is a global configuration)

Add in FunctionEntity data model

  • Short name / Abbreviation (string)

  • Start time (only time not date)

  • End time (only time not date)

  • Use validation demands (bool)

  • Send reminder notification 5 days before due date (bool)

  • Is trusted required (bool)

  • Guide link (string)

Change in entity data model

  • FixedCompensation (is always true) perhaps can be omitted

  • StaffingElectoralDistricts should be UsedInDistricts and tie to district instead

Remove from entity data model

  • ElectionId

  • Public Description

  • LisaIntegration

  • ArchiveIntegration

  • CanViewPersonData

  • CanViewBuildingData

  • SetAsDefault

Rename FunctionEntity to TaskTypeEntity in source code

  • No binding to electoral district

  • Rename to Task types

  • Move from staffing to administration area on same level as election.

  • Use upload functionality from templates page or building details page.

Add field for

  • Short name / Abbreviation (single line)

  • Start time (only time not date) ex. use the time component from the add course occasion dialog.

  • End time (only time not date) ex. use the time component from the add course occasion dialog.

  • Use validation demands (yes/no)

  • Send reminder notification 5 days (fixed interval) before due date (yes/no)

  • Is trusted required (yes/no)

  • Guide link (single line)

Remove / repurpose fields

  • Public Description

  • Fee type (always fixed)

  • Can view person data

  • Can view building data

Change

Group → Team

https://os2web.atlassian.net/browse/VALGHAL-104

Remove binding to Election (this is a global configuration)

Add in GroupEntity data model

  • Short name / Abbreviation

  • Team responsible reference(s) (TeamResponsibles)

  • Work location reference(s) (WorkLocationTeamEntity)

Change in entity data model

  • Freetext → Description

Remove from entity data model

  • ElectionId

  • ShowExternally

  • ShowPersonList

  • Rooms reference

Rename from GroupEntity to TeamEntity in source code

  • Rename to Teams

  • Move from staffing to administration area on same level as election.

  • Show Short name / Abbreviation in overview table

Add fields for

  • Short name / Abbreviation

  • Functionality to add one or more team responsible(s) like a dialog where you can search for person

Remove / repurpose fields

  • Category

  • Show person on external web

  • Show person list on external web

  • Function

  • Amount

Change

User interface

https://os2web.atlassian.net/browse/VALGHAL-284

N/A

Show election selection as a drop down in top right hand corner.
Note: If it is a lot of work, we can move it and keep the current feel with opening the dialog, then look at it as we near the end.

New

User interface

https://os2web.atlassian.net/browse/VALGHAL-281

N/A

Show a breadcrumb in the solution
If we don’t already have some kind of breadcrumb we could use:
https://www.npmjs.com/package/angular-crumbs
Implementation video https://morioh.com/p/ca769096d74d

New

User interface

https://os2web.atlassian.net/browse/VALGHAL-80

N/A

Use either

  • Small question mark icon and hover over text

  • Hover over text on the UI control it self

Help text should be localized

New

User Interface

https://os2web.atlassian.net/browse/VALGHAL-79

Store data in WebConfiguration table
Use the WebConfigurationEntity

Help icon in top righthand corner

Change

Person → Participant

https://os2web.atlassian.net/browse/VALGHAL-54

Add to the PersonEntity data model

  • Special diet reference (Guid)

  • Team reference (list)

  • Exempt from Digital post (true/false, default false)

  • Role (string)

    • Worklocation responsible

    • Team responsible

    • Reader

  • Deceased or Missing (true/false, default false)

  • Citizenship (true/false, default true)

  • CPRUpdated (Datetime)

Remove from PersonEntity data model

  • Inactive     

  • ExpressionOfInterestApproved

  • ApplicationApproved

  • FreeText

  • Car

  • HiddenIdentity

  • PersonTags

  • FormPosts

  • StaffingElectoralDistricts

Rename from PersonEntity to ParticipantEntity

Change in the PersonEventLogEntity data model

  • Rename FollowUpNeeded → ShowInNotificationPanel

  • Remove Date

  • Remove CategoryId

  • Remove Category

 

/person → Add person

Add field for

  • Special diet (dropdown)

  • Team (dropdown)

  • Exempt from Digital post (boolean)

Add button (Lookup participant) next to the Social security number, should use a service to lookup the core participant data.

Reuse eventlog interface but make it more automated, no manual entries can be put in the eventlog

Remove fields

  • Category

  • Tag

  • Car

  • Comment

  • Inactive

  • Hidden identity


All fields should be “read-only” except:

  • Special diet

  • Phonenumber

  • Mobile Phonenumber

  • E-mail

  • Team selection

 

Change

Person overview → Participant overview

https://os2web.atlassian.net/browse/VALGHAL-56

We might need to change/adjust the view supplying this functionality

/person

Show fields

  • Full name

  • Team

  • Birthday (repurpose social security number excluding the last 4 digits)

  • Assigned to at least one task (yes/no)

  • Comma separated list - Task types assigned (maybe repurpose assignments)

Remove fields

  • Phone number

  • E-mail

  • Postal code

  • Tags

  • Status

Filter changes

  • Add

    • Team

    • Digital post

  • Keep

    • Name

    • Assignments (TaskType)

    • Status ?

  • Remove

    • Social security number

    • Postal code

    • Comment

    • Category

    • Placement

    • Course

    • Education

    • Tags

Change

Person details → Participant details

https://os2web.atlassian.net/browse/VALGHAL-55

 

/person/details/<ID>

Add communication log (reuse event log or repurpose course functionality ?)

Reuse button (Lookup participant) next to the Social security number, should use a service to lookup the core participant data.

Remove:

  • Comment

  • Eventlog (maybe reuse for communication log)

  • Courses (maybe reuse for communication log)

New

Import participants

https://os2web.atlassian.net/browse/VALGHAL-58

N/A

Should be a background task, because it could take some time ?

New

Export participants