ugent-library / biblio-backoffice

Apache License 2.0
7 stars 0 forks source link

UZGent affiliation not shown everywhere consequently #1670

Closed nicolasfranck closed 2 months ago

nicolasfranck commented 3 months ago

Bug description

People that are affiliated with Ghent University Hospital have a user record with object_class containing the string uzEmployee. This is the way the UGent LDAP differentiates regular UGENT people from uzgent people.

However in the authority database we usually use the attribute departement to list all affiliations (based on ugent_department_id from LDAP). UZgent users have no ugent_department_id and therefore the affiliation has to be derived live from the object_class.

In the frontend:

cf. https://github.ugent.be/Universiteitsbibliotheek/biblio/blob/9d6d277cf2a7ce4d75bcc1fdb2509c83de8e8141/views/person/vcard.tt#L28 cf.

In the backend:

https://github.ugent.be/Universiteitsbibliotheek/biblio/blob/c01e802ec91c469d98741ca9593e18bc666d23ca/lib/Catmandu/Fix/add_person_data.pm#L88 cf. https://github.com/ugent-library/biblio-backoffice/blob/main/backends/authority/person.go#L210

This extra steps tends to be forgotten. While GetPerson tends to add this extra affiliation, SuggestPeople however does not. It gets all attributes from the ES index biblio_person which only contains a subset of all attributes in the mongodb.

Update SuggestPeople implementation too?

Steps to Reproduce

  1. Go to https://backoffice.biblio.ugent.be/publication/8688237?redirect-url=%2Fpublication&show=contributors
  2. Look for the contributor with affiliation "uzgent" in the list: shown correctly
  3. Click on the edit/change contributor button right from the contributor
  4. The current selection is shown above, with affiliation shown correctly. This because it was fetched via GetPerson
  5. If there are more records available for that same person they are shown below "Select other author". Uzgent-people are shown here WITHOUT affiliation. If you fail to find duplicate records like this, do the following: click the button for a new contributor and search for a uzgent person.

Likelihood

Occasional

Consequences

Not known

Expected behavior

A clear and concise description of what you expected to happen.

Screenshots

Screenshot 2024-07-29 at 15 39 29 Screenshot 2024-07-29 at 15 39 42 Screenshot 2024-07-29 at 15 39 53

nicolasfranck commented 3 months ago

See https://github.ugent.be/Universiteitsbibliotheek/biblio/pull/185 for fix.