Random people showing up in Author List

Hi Indico crew!

I’m getting some strange behaviour on a Indico instance (2.1.8) when looking at the Author List in the Contribution tab. Here is an example:

  1. I select a contribution:
  2. I click on the ‘Author List’ button:
  3. The modal shows some users (Annabelle in this case) that I can’t find associated in any way with the contribution/event.
  4. If I click on the edit contribution button it shows only the actual speaker:

The same Annabelle user shows also up in the Participant Roles tab as a speaker. I’m not sure if I’m doing something wrong or this is a bug.

Hi Bernard,

This is the code that queries the relevant EventPersons in the event. It’s being called from here.
I would open an indico shell and try to reproduce that query to figure out how that person ends up showing up. Maybe it’s a deleted entry that our query mistakenly includes?

1 Like

I was playing around a bit with the shell. I get some strange result and need to look deeper into it. Here are my observations for now:

# I get all the speakers for the event
speakers = display._get_persons(event, ContributionPersonLink.is_speaker)

# Try to find Annabelle and her contribution links
for speaker in speakers:
  if speaker.name == "Annabelle Guillory":
    print(speaker.contribution_links)
# [<ContributionPersonLink(1705, person_id=1593, contribution_id=615, is_speaker=True): "Hans Hersbach">]

# Get the event person with the person_id (Still not sure where Hans Hersbach comes from)
EventPerson.query.get(1593)
# <EventPerson(1593): "Annabelle Guillory">

# Get the link through the contribution
Contribution.query.get(615).person_links
# [<ContributionPersonLink(1705, person_id=1593, contribution_id=615, is_speaker=True): "Hans Hersbach">]

for speaker in speakers:
  if speaker.full_name  == "Annabelle Guillory":
    print(speaker.contribution_links[0].full_name)
# Hans Hersbach

# Let's find Hans
hans = EventPerson.query.filter_by(last_name='Hersbach').all()[0] # There is only 1
hans.contribution_links
# [<ContributionPersonLink(1773, person_id=1725, contribution_id=654, author_type=primary, is_speaker=True): "Hans Hersbach">

I have no idea why Hans shows up in the Contribution(615) if he doesn’t have a link to it. Maybe there is an issue with SQLAlchemy magic and inheritance.

EDIT:
Also if I do:

# Extract the link
for speaker in speakers:
  if speaker.name == "Annabelle Guillory":
    link = speaker.contribution_links[0]

link.id
# 1705
link.person_id
# 1593
link._first_name
# u'Hans'
link.person
# <EventPerson(1593): "Annabelle Guillory">

It looks like the link is at the same time Hans and Annabelle. We could just rename it to SchrödingersLink. But I’m not sure how we got into this state.

This looks to me like someone changed a speaker’s name and e-mail instead of removing it and adding a new one. This means that the identity is still connected to the old speaker.
So, in this case Annabelle was added as a speaker, but then someone just manually changed her data to Hans’, instead of removing her and adding Hans.
This is often caused by a bit of a UX problem we currently have: https://github.com/indico/indico/issues/3644

1 Like

It looks like this is what happened, I just reproduced it locally. Thanks for the hints.

Doesn’t this make it impossible to fix typos in the author list? Every time I grab the Author List I will only get the first version of it. And this names can be slightly different from what I see in the Contributions table. I don’t see any other way to change the names inside the Contributions section.

But if I change the name in the Participant Roles section then they change for the Author List in Contributions as well, but don’t affect the names in the Contributions tables.

It looks like they are completely disconnected, but if you delete the person it deletes all instances (with different names) of it :slight_smile:.

This can be confusing. I will suggest my users to always delete the person and create a new one for any edit.

I think that what’s happening is that in the author’s list we’re getting the EventPerson’s name, and not the one in the link. Normally that shouldn’t make much difference, but indeed we should take the link.
We definitely have to improve the UX so that people understand what is going on.