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 missing return version end dates during import #954

Merged
merged 2 commits into from
Jun 12, 2024

Conversation

Cruikshanks
Copy link
Member

@Cruikshanks Cruikshanks commented Jun 12, 2024

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

We've been extending and amending the import of return versions from NALD to WRLS as part of our work to switch from NALD to WRLS for managing them.

We've spotted that some of the return versions we are importing are missing end dates.

Return Version ID Licence ID Version number Start date End date Status
RV1 LV1 100 1984-10-22 2008-03-31 Current
RV2 LV1 101 2008-04-01 2009-03-31 Current
RV3 LV1 102 2009-04-01 Current
RV4 LV1 103 2023-04-01 Current

We expect the 'latest' return version to have no end date because it reflects the return requirements that should be used for anything in the future. But in this example, RV3 should have an end date (2023-03-31). This is an error on the part of NALD we should correct during the import.

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

We've been extending and amending the import of return versions from NALD to WRLS as part of our work to switch from NALD to WRLS for managing them.

We've spotted that some of the return versions we are importing are missing end dates.

|Return Version ID|Licence ID|Version number|Start date|End date  |Status |
|-----------------|----------|--------------|----------|----------|-------|
|RV1              |LV1       |100           |1984-10-22|2008-03-31|Current|
|RV2              |LV1       |101           |2008-04-01|2009-03-31|Current|
|RV3              |LV1       |102           |2009-04-01|          |Current|
|RV4              |LV1       |103           |2023-04-01|          |Current|

We expect the 'latest' return version to have no end date because it reflects what is the return requirements that should be used for anything in the future. But in this example `RV3` should have an end date. This is an error on the part of NALD we should correct during the import.
@Cruikshanks Cruikshanks added the enhancement New feature or request label Jun 12, 2024
@Cruikshanks Cruikshanks self-assigned this Jun 12, 2024
@Cruikshanks Cruikshanks marked this pull request as ready for review June 12, 2024 11:42
@Cruikshanks Cruikshanks merged commit 171890c into main Jun 12, 2024
4 checks passed
@Cruikshanks Cruikshanks deleted the add-missing-return-version-end-dates-on-import branch June 12, 2024 11:44
Cruikshanks added a commit that referenced this pull request Aug 30, 2024
https://eaflood.atlassian.net/browse/WATER-4514

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

In [Add missing return version end dates during import](#954) we added a query to the import that will fill in the missing end dates for return versions imported from NALD. WRLS requires a 'complete' history in the versions (no gaps) which isn't enforced in NALD.

It works great! The problem is it didn't consider returns versions added directly to WRLS. In fairness, it didn't need to. The intent is that the import would be killed on the day WRLS took over return version management.

In practice though, the team and our users are trying to conduct testing of the new functionality, but then seeing what they've added messed with when the import runs during the night.

This change updates the query to ignore stuff added directly in WRLS, and just look at the records imported from NALD to stop things getting messed up.
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