-
Notifications
You must be signed in to change notification settings - Fork 0
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
Cruikshanks
merged 9 commits into
main
from
add-history-attributes-to-charge-version-model
Aug 20, 2024
Merged
Add history attributes to ChargeVersionModel #1272
Cruikshanks
merged 9 commits into
main
from
add-history-attributes-to-charge-version-model
Aug 20, 2024
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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).
11580b2
to
d873979
Compare
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
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
https://eaflood.atlassian.net/browse/WATER-4560
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.