-
Notifications
You must be signed in to change notification settings - Fork 38
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
fix(Formatters): correctly detect main table fields #4516
Conversation
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.
Testing instructions
- Make sure When creating a record using a query combo box the entered value is deposited in the wrong field #4512 is fixed
- Take a look at
Line 2033 in 23450dd
exports[`getMainTableFields 1`] = `
I can't say I completely understand the logic that determines this list, but it seems to be more logical? Some don't make much sense to me (some tables have a series of generic text fields as the 'main fields') but it behaves as I'd expect in the application. I'd like another UX tester to verify the behavior is consistent across a number of QCBXes with production.
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.
The issue of new agents filling firstName field has been resolved, the qcbx correctly fills the lastName field on the form again.
I'd like another UX tester to verify the behavior is consistent across a number of QCBXes with production.
I also don't fully understand this list, but things appear to be mostly correct and logical.
I tested various parts of the application including Geography, Repository Agreement, Storage, etc.
For future reference, here is a human-readable translation of the algorithm that determines the main table fields:
The result is a sorted list of fields from most important to least. In the case of query combo box, it picks the first "main field" that is specified in the searchfields attribute in the typesearches.xml |
Fixes #4512
Checklist
and self-explanatory (or properly documented)
Testing instructions
specify7/specifyweb/frontend/js_src/lib/components/Formatters/__tests__/__snapshots__/formatters.test.ts.snap
Line 2033 in 23450dd