-
Notifications
You must be signed in to change notification settings - Fork 78
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
LF-4309 Complete form breaks when not completed fast enough allowing page to time out or something #3324
Conversation
…and task utilities
The patch is now correctly omitting the irrelevant field, so the old data is not overriden, which can trigger the check constraint.
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.
Also confirmed that https://lite-farm.atlassian.net/browse/LF-4333, https://lite-farm.atlassian.net/browse/LF-4329 and https://lite-farm.atlassian.net/browse/LF-4324 were fixed.
Thank you!
soil_amendment_task_products: DBSoilAmendmentTaskProduct[]; | ||
[key: string]: any; | ||
}; | ||
|
||
type FormTask = { |
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.
I don't know if I would have undid the updated naming since soil_amendment_task
has meaning and does not have property of soil_amendment_task_products
.
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.
Always love a net removal of code! ❤️
I like what you are saying for PATCH being able to make the decision that a POST could not 👍 . I think we will need to add to this for weight and volume too. I thought I saw a similar bug there.
Description
This PR removes the passing of the purpose and method keys from the saga to the task utility functions in favour of using
{ shouldUnregister: true }
on the inputs that need to be nulled when their method_id / purpose_id is not selectedNotes:
api.endpoints.getSoilAmendmentPurposes.select()(state),
fixes the timeout that makes the form unsubmittable after the api cache expires<Unit />
component needed a little bit of adjustment to acceptshouldUnregister: true
other_application_method
), potentially triggering the check constraintshouldUnregister
or the task flow revert as well) resolves the other persistence bugs we saw; I will re-test this momentarily then indicate their tickets below as wellJira link: https://lite-farm.atlassian.net/browse/LF-4309
Type of change
How Has This Been Tested?
Checked on the
soil_amendment_task
product table and thesoil_amendment_task_products_purpose_relationship
table of db.Checklist: