User-friendly query generation no longer works if idColumnName ≠ id
Description
User-friendly queries no longer generate properly for fields with an idColumnName if that idColumnName is set to anything other than id.
Unfortunately for testing, the vast majority of our fields don’t meet this criteria, so this has been broken for an unknown amount of time:
Steps to reproduce
Create a new list with the Organizations entity type
Create a query with Acquisition unit names, any operator/value
Run query & save
Observe the user-friendly query
Expected outcome
Pretty values
Actual outcome
Ugly UUIDs
Additional analysis
The following was produced when testing against organizations' acq_unit_names. This appears to be a casting error in the entity definition, but does not solve the underlying problem with using different IDs in the same entity type. When mod-lists hits /query/contents with the list of IDs to fetch data for, mod-fqm-manager assumes the IDs are for the entity type’s main ID, rather than others (e.g. acq_unit_ids).
CSP Request Details
None
CSP Rejection Details
None
Potential Workaround
None
Attachments
5
Checklist
hide
Activity
Show:
Emma_HaroyanJanuary 31, 2025 at 9:30 AM
Works as expected on Snapshot
Bobby SharpJanuary 30, 2025 at 7:55 PM
Hey , this is fixed and available for testing in perf, edev, and snapshot. The user-friendly query that displays on the list page should now correctly show array values instead of UUIDs. UUIDs will still be displayed in the query builder modal; that will be fixed by .
Noah OvercashJanuary 3, 2025 at 7:20 PM
I’ve partially resolved this issue, but not in a way that handles array fields. The partial resolution is currently untestable, but will be used as part of .
User-friendly queries no longer generate properly for fields with an
idColumnName
if thatidColumnName
is set to anything other thanid
.Unfortunately for testing, the vast majority of our fields don’t meet this criteria, so this has been broken for an unknown amount of time:
Steps to reproduce
Create a new list with the Organizations entity type
Create a query with Acquisition unit names, any operator/value
Run query & save
Observe the user-friendly query
Expected outcome
Pretty values
Actual outcome
Ugly UUIDs
Additional analysis
The following was produced when testing against
organizations
'acq_unit_names
. This appears to be a casting error in the entity definition, but does not solve the underlying problem with using different IDs in the same entity type. Whenmod-lists
hits/query/contents
with the list of IDs to fetch data for,mod-fqm-manager
assumes the IDs are for the entity type’s main ID, rather than others (e.g.acq_unit_ids
).