-
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
Persist match and allocate issues and status #772
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-4378 During the refinement of future two-part tariff tickets, it was noted that the status of a licence could be changed by the user from a 'review' status to a 'ready' status. Before this was noted we were working out the licence status based on the issues the licence has with its returns and charge elements. This is done on every page where the licence status is being shown. Now that we know a status can be overwritten regardless of its issues, we now need to persist the licence status during the first time the engine works it out and show the persisted status instead of working it out each time. This will allow users to manually change the status. The same thing applies to the charge elements. The status of the element is determined by the issues on it. This status at the moment is worked out every time it is displayed on a page. We have since learnt through refinement that a user can allocate volumes on the element and this will change the status from 'review' to 'ready'. This is regardless of the issues that remain on a charge element. So with this new information, it has made it clear that we now need to persist the initial status of the charge element to allow this to be overwritten when needed. This opened up a lot of discussions about how we could refactor the review tables to work more effectively with how the two-part tariff engine works now. When we first built the tables we did so with the knowledge we had at the time. Now that we have worked on more tickets and started building actual pages we realised we could persist the data better. TLDR: Review tables updated to add status and issues
These migrations create a new `review_charge_elements` table as well as rename some of the existing `review` tables and add some additional columns.
Co-authored-by: Becky Ransome <[email protected]>
Co-authored-by: Becky Ransome <[email protected]>
Co-authored-by: Becky Ransome <[email protected]>
Co-authored-by: Becky Ransome <[email protected]>
The IDs are automatically generated by the DB so there is no need to have them in the helpers
Co-authored-by: Becky Ransome <[email protected]>
Co-authored-by: Becky Ransome <[email protected]>
Jozzey
commented
Mar 11, 2024
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Beckyrose200
approved these changes
Mar 11, 2024
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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-4378
During the refinement of future two-part tariff tickets, it was noted that the status of a licence could be changed by the user from a 'review' status to a 'ready' status. Before this was noted we were working out the licence status based on the issues the licence has with its returns and charge elements. This is done on every page where the licence status is being shown. Now that we know a status can be overwritten regardless of its issues, we now need to persist the licence status during the first time the engine works it out and show the persisted status instead of working it out each time. This will allow users to manually change the status.
The same thing applies to the charge elements. The status of the element is determined by the issues on it. This status at the moment is worked out every time it is displayed on a page. We have since learnt through refinement that a user can allocate volumes on the element and this will change the status from 'review' to 'ready'. This is regardless of the issues that remain on a charge element. So with this new information, it has made it clear that we now need to persist the initial status of the charge element to allow this to be overwritten when needed.
This opened up a lot of discussions about how we could refactor the review tables to work more effectively with how the two-part tariff engine works now. When we first built the tables we did so with the knowledge we had at the time. Now that we have worked on more tickets and started building actual pages we realised we could persist the data better.
TLDR: Review tables updated to add status and issues