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

Clean up return reqs. linked to due return logs #1041

Merged
merged 2 commits into from
Nov 18, 2024

Conversation

Cruikshanks
Copy link
Member

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

Part of the work to migrate management of return requirements from NALD to WRLS

Having made return versions and requirements visible to our internal users, they have noticed that there are return requirements displayed in WRLS that don't exist.

We know why this is: NALD allows users to delete records. This means a user can create a record in NALD on day 1; we'll see and import the record that night. They can then delete the record (in most cases, it is because a mistake was spotted) on day 2. The import never deletes records, so the errant return requirement remains.

With us taking over management of return requirements, it has become important to try to get the two systems in sync as much as possible before the import is switched off.

This change builds on the work done in Add return requirements clean-up step to import. It added the job and the script to remove return requirements that no longer exist in NALD and were not linked to any return logs.

We then moved on to Clean up return reqs. linked to void return logs. This final change adds the query to delete any return requirements that no longer exist in NALD and are only linked to due return logs.

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

> Part of the work to migrate management of return requirements from NALD to WRLS

Having made return versions and requirements visible to our internal users, they have noticed that there are return requirements displayed in WRLS that don't exist.

We know why this is: NALD allows users to delete records. This means a user can create a record in NALD on day 1; we'll see and import the record that night. They can then delete the record (in most cases, it is because a mistake was spotted) on day 2. The import never deletes records, so the errant return requirement remains.

With us taking over management of return requirements, it has become important to try to get the two systems in sync as much as possible before the import is switched off.

This change builds on the work done in [Add return requirements clean-up step to import](#1017). It added the job and the script to remove return requirements that no longer exist in NALD and were not linked to any return logs.

We then moved on to [Clean up return reqs. linked to void return logs](#1030). This final change adds the query to delete any return requirements that no longer exist in NALD and are only linked to `due` return logs.
@Cruikshanks Cruikshanks added the housekeeping Refactoring, tidying up or other work which supports the project label Nov 18, 2024
@Cruikshanks Cruikshanks self-assigned this Nov 18, 2024
@Cruikshanks Cruikshanks marked this pull request as ready for review November 18, 2024 09:40
@Cruikshanks Cruikshanks merged commit 958f49e into main Nov 18, 2024
4 checks passed
@Cruikshanks Cruikshanks deleted the clean-up-rtn-req-linked-to-due-rtns branch November 18, 2024 22:43
Cruikshanks added a commit that referenced this pull request Nov 20, 2024
https://eaflood.atlassian.net/browse/WATER-4656

> Part of the work to migrate management of return requirements from NALD to WRLS

In [Clean up return reqs. linked to due return logs](#1041) we amended our return versions clean job to also allow return requirements linked to 'due' return logs to be deleted.

Only, our amendment was missing a ' so it actually broke the job! 🤦

This change fixes the query (and we properly checked this time 😳😬)
Cruikshanks added a commit that referenced this pull request Nov 20, 2024
https://eaflood.atlassian.net/browse/WATER-4656

> Part of the work to migrate management of return requirements from NALD to WRLS

In [Clean up return reqs. linked to due return logs](#1041), we amended our return versions clean job to also allow return requirements linked to 'due' return logs to be deleted.

Only, our amendment was missing a `'`, so it broke the job! 🤦

This change fixes the query (and we properly checked this time 😳😬)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
housekeeping Refactoring, tidying up or other work which supports the project
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants