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

Add history attributes to ChargeVersionModel #1272

Merged
merged 9 commits into from
Aug 20, 2024

Conversation

Cruikshanks
Copy link
Member

https://eaflood.atlassian.net/browse/WATER-4560

Part of the work to display NALD mod log records as history in WRLS

So, we are now importing mod logs from NALD and have added a model linked to charge, licence and return version models to allow us to retrieve them from the database.

We are in the process of building a new licence history page and we need to update the view of the charge version in the future.

Because of this, we believe adding a modifier and instance methods to the ChargeVersionModel that will handle fetching the mod logs and determining this information is valuable.

This change updates the ChargeVersionModel with these properties. This is similar to the work we did in Add history attributes to ReturnVersionModel and Add history attributes to LicenceVersionModel.

@Cruikshanks Cruikshanks added the enhancement New feature or request label Aug 20, 2024
@Cruikshanks Cruikshanks self-assigned this Aug 20, 2024
Cruikshanks added a commit that referenced this pull request Aug 20, 2024
https://eaflood.atlassian.net/browse/WATER-4579

We recently started [seeding the test DB with reference data](#1206). We then [Restructured that seeding to be Knex based](#1230).

We thought we'd covered all reference data with the seeding. But we've just spotted that we missed charge version change reasons (`ChangeReasonModel`).

We're about to add some new unit tests in [Add history attributes to ChargeVersionModel](#1272) that depend on them. So, rather than insert yet more into the DB, this change switches change reasons to be 'reference' based, i.e. tests should select from pre-seeded reasons rather than adding generated ones.
Cruikshanks added a commit that referenced this pull request Aug 20, 2024
https://eaflood.atlassian.net/browse/WATER-4579

We recently started [seeding the test DB with reference data](#1206). We then [Restructured that seeding to be Knex based](#1230).

We thought we'd covered all reference data with the seeding. But we've just spotted that we missed charge version change reasons (`ChangeReasonModel`).

We're about to add some new unit tests in [Add history attributes to ChargeVersionModel](#1272) that depend on them. So, rather than inserting more into the DB, this change switches change reasons to be 'reference' based, i.e., tests should select from pre-seeded reasons rather than adding generated ones.
https://eaflood.atlassian.net/browse/WATER-4560

> Part of the work to display NALD mod log records as history in WRLS

So, we are now importing mod logs from NALD and have added a model linked to charge, licence and return version models to allow us to retrieve them from the database.

We are in the process of building [a new licence history page](#1182) and we need to update the view of the charge version in the future.

Because of this, we believe adding a modifier and instance methods to the `ChargeVersionModel` that will handle fetching the mod logs and determining this information is valuable.

This change updates the `ChargeVersionModel` with these properties. This is similar to the work we did in [Add history attributes to ReturnVersionModel](#1267) and [Add history attributes to LicenceVersionModel](#1271).
@Cruikshanks Cruikshanks force-pushed the add-history-attributes-to-charge-version-model branch from 11580b2 to d873979 Compare August 20, 2024 21:22
@Cruikshanks Cruikshanks marked this pull request as ready for review August 20, 2024 21:59
@Cruikshanks Cruikshanks merged commit 1d1b063 into main Aug 20, 2024
6 checks passed
@Cruikshanks Cruikshanks deleted the add-history-attributes-to-charge-version-model branch August 20, 2024 22:00
Cruikshanks added a commit that referenced this pull request Aug 20, 2024
https://eaflood.atlassian.net/browse/WATER-4579

We recently started [seeding the test DB with reference data](#1206). We then [Restructured that seeding to be Knex based](#1230).

We thought we'd covered all reference data with the seeding. But we've just spotted that we missed charge version change reasons (`ChangeReasonModel`).

We're about to add some new unit tests in [Add history attributes to ChargeVersionModel](#1272) that depend on them. So, rather than inserting more into the DB, this change switches change reasons to be 'reference' based, i.e., tests should select from pre-seeded reasons rather than adding generated ones.
Cruikshanks added a commit that referenced this pull request Aug 20, 2024
https://eaflood.atlassian.net/browse/WATER-4560

> Part of the work to display NALD mod log records as history in WRLS

So, we are now importing mod logs from NALD and have added a model linked to charge, licence and return version models to allow us to retrieve them from the database.

We are in the process of building [a new licence history page](#1182) and we need to update the view of the charge version in the future.

Because of this, we believe adding a modifier and instance methods to the `ChargeVersionModel` that will handle fetching the mod logs and determining this information is valuable.

This change updates the `ChargeVersionModel` with these properties. This is similar to the work we did in [Add history attributes to ReturnVersionModel](#1267) and [Add history attributes to LicenceVersionModel](#1271).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant