Closed philgooch closed 11 years ago
Adding the following lines to def get_item_label (self, item): in lines 24-26 in eats/lookups.py seems to work here, but please confirm if this is the best approach:
preferred_name = item.get_preferred_name(None, None, None)
if (preferred_name):
name_assertion = preferred_name
Actually this only partially fixes the problem :( Preferred names are displayed in the auto-complete, but on selecting that name, the text reverts to the most recently added name type for that entity.
Any pointers appreciated :)
Doh!, just needed to make the same change to get_item_value(). Works fine now.
When typing into the 'Related entity' field when adding or editing an entity relationship, for a given entity the most recently added name type is displayed, rather than the preferred name (if ticked).
I think it would be helpful if the preferred name was shown. E.g. if you wanted to create an entity relationship to an entity that had 'Smith, Joan' as its preferred name type, and this entity had another maiden name type of say 'Jones, Joan', which had been added later, you'd want 'Smith, Joan' to appear in the auto-complete field, not 'Jones, Joan'.