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

Exclude not-required rtn versions from copy exist #1086

Merged
merged 3 commits into from
Jun 10, 2024

Conversation

Cruikshanks
Copy link
Member

@Cruikshanks Cruikshanks commented Jun 10, 2024

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

Part of the work to replace NALD for handling return requirements

We want to be able to offer users the option to copy data from an existing return requirement when setting up a new one. We made the option available in the /setup page.

We then implemented the logic to fetch the existing data and transform it into something that can be stored in the session for later persisting as a new record.

One of the new features we're enabling with our takeover is the ability to record where a return requirement is not needed. Our new journey allows for this.

When this happens, though, we'll need to persist a return version to record it. It will be 'current' but it will have no return requirements linked to it.

Because of this, we need to tweak the query that fetches which return versions can be copied from to exclude those without any return requirements.

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

> Part of the work to replace NALD for handling return requirements

We want to be able to offer users the option to copy data from an existing return requirement when setting up a new one. We [made the option available](#1081) in the `/setup` page.

We then implemented the logic to fetch the existing data and transform it into a something that can be stored in the session for later persisting back as a new record.

One of the new features we're enabling with our takeover is the ability to record where a return requirement is _not_ needed. Our new journey allows for this.

When this happens though, we'll need to persist a return version to record it. It will be 'current' but it will have no return requirements linked to it.

Because of this we need to tweak the query which fetches which return versions can be copied from to exclude those without any return requirements.
@Cruikshanks Cruikshanks added the enhancement New feature or request label Jun 10, 2024
@Cruikshanks Cruikshanks self-assigned this Jun 10, 2024
This includes the one we expect to fail at the moment; a current return version without any return requirements
@Cruikshanks Cruikshanks marked this pull request as ready for review June 10, 2024 22:07
@Cruikshanks Cruikshanks merged commit d91da77 into main Jun 10, 2024
6 checks passed
@Cruikshanks Cruikshanks deleted the amend-fetch-existing-rtn-req-query branch June 10, 2024 22:08
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