-
Notifications
You must be signed in to change notification settings - Fork 3
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
UISACQCOMP-159: fix A user can not save edited PO line issue #713
Conversation
Jest Unit Test Statistics 1 files ±0 139 suites ±0 3m 14s ⏱️ +5s Results for commit 1f0c2e1. ± Comparison against base commit 79ab128. This pull request removes 2 and adds 5 tests. Note that renamed tests count towards both.
♻️ This comment has been updated with latest results. |
Kudos, SonarCloud Quality Gate passed! |
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.
Sorry, it's hard to reconcile the info in Jira ("Expected Results: Changes were successfully saved") with the info in the PR description here ("Prevent submit if the fields are not valid") since the latter basically restates the problem but claims it's a solution 😅 .
As I understand the changes, they use the beforeSubmit
final-form attribute to prevent submission of the form if a required attribute is missing a value. Do these new beforeSubmit
functions do something the ordinary validation functions couldn't?
Basically, it prevents the form from being submitted if the values are missing. In our case, although there is an error |
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.
OK, we're on the same page.
maybe we should think about moving to another more industry-standard form library such as formik or react-hook-form. Of course, this is a suggestion based on the current trends comparison 😅
Totally totally agree. Replacing redux-form with final-form felt like a great choice when we made it in 2018 since the migration path was much smaller than refactoring to formik and react-hook-form didn't even exist yet. But in retrospect, yeah, npm-trends shows it was a terrible choice. We don't have a specific plan, but migrating is on our radar.
Purpose
UISACQCOMP-159 - A user can not save edited PO line when budget without expense class was selected
Approach
Screen.Recording.2023-08-30.at.7.53.39.PM.mov
Pre-Merge Checklist
Before merging this PR, please go through the following list and take appropriate actions.
If there are breaking changes, please STOP and consider the following:
Ideally all of the PRs involved in breaking changes would be merged in the same day to avoid breaking the folio-testing environment. Communication is paramount if that is to be achieved, especially as the number of intermodule and inter-team dependencies increase.
While it's helpful for reviewers to help identify potential problems, ensuring that it's safe to merge is ultimately the responsibility of the PR assignee.