Page MenuHomePhabricator

Detect/handle Cronos duplicated Events
Closed, ResolvedPublic2 Estimated Story Points

Description

After T254264: Synergy / import with French "Events calendar" the WMCH Cronos supports federation but it should be able to handle the case of duplicated Events.

Use case

Maybe someone creates an Event in one calendar and then another user creates it in WMCH Cronos and it's not a good idea to just remove one of the two events. Instead, we should avoid duplicates.

Changes

We introduced a family of arguments acting as connectors between each federated calendar.

In short, each Event now supports a cluster of id something identifiers. For example:

Internally in the CronosEvent object they are saved under the ids attribute (e.g. ids.local, ids.meta-fr etc.).

Note that internally each CronosEvent object also has the source attribute indicating the source of the data. For example it's meta-fr or wmf-phab or local for local ones. This distinguish local Events from imported events.

It's important to support both multiple ids and a source, because we can have an Event imported from the French calendar associated to multiple IDs, as well as a Cronos event associated to multiple IDs.

Now, on Meta-wiki, if a Cronos calendar has one event not marked as source = local and with one or more of these external identifier, it should just skip it, assuming that another event with source = something-else should be displayed instead.

Future idea: if one of these identifiers is found, Cronos may be able to merge the available information using some criteria.