specify / specify7

Specify 7
https://www.specifysoftware.org/products/specify-7/
GNU General Public License v2.0
66 stars 36 forks source link

Workbench automapper takes strange detour through Cataloger Agent #3921

Open FedorSteeman opened 1 year ago

FedorSteeman commented 1 year ago

In some cases, that can be hard to predict, the Workbench Automapper maps to a field in a related table, like collecting event, through the cataloger (and sometimes other) agent.

image

These strange detours will then have to be unmapped and the more straightforward mapping to collectingevent attributes done instead. Could this be mitigated?

maxpatiiuk commented 1 year ago

what does the label for your collecting event attribute fields you want to map to looks like? automapper tries to match the dataset column name both against the localized field name, as well as database field name. also, it's not smart enough at the moment to handle camelCase header names properly. @FedorSteeman is that common in the production data sets?

it's possible that automapper fails to map to those, and in search of mapping as many fields as it can it settles for the best it can find.

FedorSteeman commented 1 year ago

Why the detour through the Cataloger agent, though? Why not directly to Collecting Event?

maxpatiiuk commented 1 year ago

Ah, thanks for the clarification.

Few possible reasons:

A proper fix would be to make automapper smarter:

and yet, there is only so much you can achieve with hardcoded rules or string comparison algorithms. some sort of light ML network would be best - something small enough that can be run on the client.