rism-digital / muscat

🗂️ A Rails application for the inventory of handwritten and printed music scores
http://muscat-project.org
34 stars 16 forks source link

Pregenerate and use a person display_name to disambiguate similar ones #1609

Open fjorba opened 3 months ago

fjorba commented 3 months ago

When different people share the same or similar name, other fields are used to distinguish them, like life dates. In Muscat, this richer form of name is used, at least, in autocomplete forms, although it could be used on other places. Instead of building it each time, create it once and store it in db.

fjorba commented 3 months ago

This patch does not address the scenario of empty display_name fields when they are not yet created. In my instances, they are already pregenerated during the import phase. Maybe a temporary solution could be to check in autocomplete_label if its empty and, in that case, call set_object_fields and save before doing a retrospective creation with a specific job?