-
Notifications
You must be signed in to change notification settings - Fork 2
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
Check renewal for relevant convictions #193
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/WC-241 While users have the option to declare convictions themselves, we should also check details against our own conviction records and flag for review as required. The app should check key people and businesses. Any flagged renewals will be reviewed in the back office (implementation for this is a separate story). If a renewal is flagged, users should be sent to the "renewal received" page, rather than "renewal complete", and the renewal should not be carried out until a member of staff reviews it in the back office.
Create a new service to send entity matching requests to the Waste Carriers Service API. So far this just formats the correct URLs to send the query. For now, we return the URLs so we have something to test - this is just temporary. This commit also sets up some extra date formatting, env vars and test factories to prepare for the request.
Use the URLs we've built to send an entity matching request to the waste carriers service API.
Add some more tests to cover various errors we might get when making a request. Also remove the :not_found response, as this was copied from the address lookup but doesn't apply here.
irisfaraway
force-pushed
the
feature/conviction-checks
branch
from
June 22, 2018 10:12
e3e96b4
to
435b42c
Compare
This is to match the behaviour of the frontend app. If we get an error, we should record that the entity match result is unknown, so it can be flagged and checked again later.
If the result is for the business, it's stored on the transient_registration itself. If it's for a person, it's stored under that person. We save the result whether it's a positive or negative match. If we run into an error when sending our query to the Java service, we save an "unknown" result.
If a user posts the declaration form and the params are valid, we instantiate and run the EntiyMatchingService.
irisfaraway
requested review from
Cruikshanks
and removed request for
Cruikshanks
June 22, 2018 14:49
If a business or a key person gets a positive or unknown match, don't renew that registration immediately, regardless of payment method. Instead, send the user to the "renewal application received" page. A member of staff can then check the matched result and confirm or reject the renewal in the back office.
irisfaraway
force-pushed
the
feature/conviction-checks
branch
from
June 25, 2018 11:29
2053906
to
f69ca0d
Compare
Cruikshanks
approved these changes
Jun 25, 2018
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/WC-241
While users have the option to declare convictions themselves, we should also check details against our own conviction records and flag for review as required. The app should check key people and businesses. Any flagged renewals will be reviewed in the back office (implementation for this is a separate story).
If a renewal is flagged, users should be sent to the "renewal received" page, rather than "renewal complete", and the renewal should not be carried out until a member of staff reviews it in the back office.