-
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
Update view return version to include mod log info #1261
Merged
Merged
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
https://eaflood.atlassian.net/browse/WATER-4634 With the information around modLog in WRLS, we intend to display it in the new [licence history page](https://eaflood.atlassian.net/browse/WATER-4566). This information being showed on the history page is the same as what is being displayed on the return version page. So we should update it to use mod log info to make the page more accurate. This PR will incorporate the modLog information into the return version page.
rvsiyad
added
the
housekeeping
Refactoring, tidying up or other work which supports the project
label
Aug 16, 2024
…mation in view presenter
…ew presenter test
Cruikshanks
added a commit
that referenced
this pull request
Aug 18, 2024
https://eaflood.atlassian.net/browse/WATER-4563 https://eaflood.atlassian.net/browse/WATER-4564 https://eaflood.atlassian.net/browse/WATER-4565 > Part of the work to display a licence's history to users (mod log) Now we have a table to hold the imported NALD mod log records we need a model to access it, and relationships to access the mod logs from charge, licence, and return versions. Once added and linked we can then complete our work to expose this information, for example. - [Build new licence history page](#1182) - [Update view return version to include mod log info](#1261)
Merged
Cruikshanks
added a commit
that referenced
this pull request
Aug 18, 2024
https://eaflood.atlassian.net/browse/WATER-4563 https://eaflood.atlassian.net/browse/WATER-4564 https://eaflood.atlassian.net/browse/WATER-4565 > Part of the work to display a licence's history to users (mod log) Now that we have a table to hold the imported NALD mod log records, we need a model to access it and relationships to access the mod logs from charge, licence, and return versions. Once added and linked, we can complete our work to expose this information, for example. - [Build new licence history page](#1182) - [Update view return version to include mod log info](#1261)
Cruikshanks
added a commit
that referenced
this pull request
Aug 19, 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 [Updating view return version to include mod log info](#1261). These are 2 places that will need to display the same 'history' attributes, for example, when the record was created and who by, in two different places. Because of this we believe there is value in adding a modifier and instance method to the `ReturnVersionModel` that will handle fetching the mod logs and determining this information. This change updates the `ReturnVersionModel` with these properties. This will also form a pattern we'll apply to `LicenceVersionModel` and `ChargeVersionModel` in later changes.
Cruikshanks
added a commit
that referenced
this pull request
Aug 19, 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 [Updating view return version to include mod log info](#1261). These two places will need to display the same 'history' attributes, for example, when the record was created and who created it. Because of this, we believe adding a modifier and instance methods to the `ReturnVersionModel` that will handle fetching the mod logs and determining this information is valuable. This change updates the `ReturnVersionModel` with these properties. In later changes, this will also form a pattern we'll apply to `LicenceVersionModel` and `ChargeVersionModel`.
Cruikshanks
added a commit
that referenced
this pull request
Aug 20, 2024
https://eaflood.atlassian.net/browse/WATER-4634 In this instance we felt it was more constructive to provide the feedback for the original [Update view return version to include mod log info](#1261) proposed PR as a series of commits from where the code has been left. This can be used to guide suggested changes, hopefully with better context than just PR comments.
Alan's suggested updates * Reverting presenter test with tweaks I think because of the churn that has gone on with mod logs whilst trying to pull together this PR, changes have been made to the presenter tests that are not really needed. Plus, we can create model instances from an Object, avoiding the need to create 'fake' versions of methods. So, we revert this test file pretty much back to its original state, before then fixing and expanding the tests. * Housekeeping - remove redundant describe Made me keep putting the `only()` in the wrong place. * Fix the tests I broke switching to a model I'd overlooked switching to using an actual model instance rather than just an object would mean ensuring we have model instances all the way down! * Properly handle all reason scenarios The notes explain what the scenarios are we need to cover. * Expand reason tests We are not looking to retest what is already covered by the model. But we do want to test every scenario our presenter may face. Plus this serves as a handy way to document all the possible outcomes we may get from the presenter. * Move createdBy to a function IMHO I think this cleans up what is happening in the go(). It also avoids doing the same 'work' twice. `$createdBy` gives us a result which it is then on the presenter to determine what to do with it. * Remove new date wrapper I don't think we need this any more. Did some testing and all seemed fine. * Remove escape Calling a macro appears to be different to a function or filter. Nunjucks interprets the value differently so we don't need to pass it to the `escape` filter. * Revert change to seeder It was fine as a one liner! * Tweak to the helper function We can revert the beforeEach back to what it was now we have a better idea of how the helper function can work. * Revert changes to view service test then tweak We can apply the same tweaks we did to view presenter test to get this passing again with the minimum of changes.
Cruikshanks
approved these changes
Aug 21, 2024
Cruikshanks
added a commit
that referenced
this pull request
Aug 21, 2024
https://eaflood.atlassian.net/browse/WATER-4639 > Part of the work to display a licence's history to users (mod log) In [Update view return version to include mod log info](#1261) we update the view return version page to include details taken from a return version's mod log history. But you access that from the table 'Requirements for returns' on the view licence page's setup tab. We've not incorporated pulling missing details from the return version history there which means they are now out of sync. This change updates how we generate the page data to include the same information we show when you click through to the view return version page.
Cruikshanks
added a commit
that referenced
this pull request
Aug 21, 2024
https://eaflood.atlassian.net/browse/WATER-4639 > Part of the work to display a licence's history to users (mod log) In [Update view return version to include mod log info](#1261), we update the view return version page to include details taken from a return version's mod log history. You access that from the table 'Requirements for returns' on the view licence page's setup tab. We haven't incorporated pulling missing details from the return version history there, which means they are now out of sync. This change updates how we generate the page data to include the same information we show when you click through to the view return version page.
Cruikshanks
added a commit
that referenced
this pull request
Aug 21, 2024
https://eaflood.atlassian.net/browse/WATER-4640 > Part of the work to display a licence's history to users (mod log) In [Update view return version to include mod log info](#1261), we updated the view return version page to include details taken from a return version's mod log history. Then in [Update return versions table with reasons in view](#1281) we updated the table of return requirements in the view licence setup tab to display the mod log reason for return versions without a mapping. The final place we display return version reasons is the 'Use previous requirements for returns' page in the return version set up journey. This change updates the logic so for return versions without a reason but that have a mod log with a reason, we use its description.
Cruikshanks
added a commit
that referenced
this pull request
Aug 21, 2024
https://eaflood.atlassian.net/browse/WATER-4640 > Part of the work to display a licence's history to users (mod log) In [Update view return version to include mod log info](#1261), we updated the view return version page to include details taken from a return version's mod log history. Then, in [Update return versions table with reasons in view](#1281), we updated the table of return requirements in the view licence setup tab to display the mod log reason for return versions without a mapping. The final place we display return version reasons is the 'Use previous requirements for returns' page in the return version set-up journey. This change updates the logic for return versions without a reason but that have a mod log with a reason: we use its description.
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-4634
With the information around modLog in WRLS, we intend to display it on the new licence history page. The information being shown on the history page is the same as what is being displayed on the return version page. So we should update it to use mod log information to make the page more accurate.
This PR will incorporate the modLog information into the return version page.