Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prevent uploading low precision timestamp when high precision one exists #28

Merged
merged 8 commits into from
Sep 13, 2018

Conversation

Vesihiisi
Copy link
Owner

@Vesihiisi Vesihiisi commented Sep 6, 2018

Our upload framework will upload a date with the value YYYY even if the item already has a more precise value, like YYYY-MM-DD.

Technically this is correct behavior because a claim can have multiple values. Normally, multiple values are not uploaded if they are identified as duplicates, however in this case it is not applicable because obviously those are two different values.

Thus we need an extra check specifically for datetime values to detect whether the new value is a less precise version of the old value, in which case it should be treated as a duplicate and not uploaded.

Note that if the two values are actually different, like 1988-02-02 and 1989, they should not be treated as duplicates, as they are not different versions of the same datetime.

This is very relevant to the authority upload, as Libris contains mostly only years of authors' birth/death dates.

Task: https://phabricator.wikimedia.org/T202400

@Vesihiisi Vesihiisi merged commit 9695dff into master Sep 13, 2018
@Vesihiisi Vesihiisi deleted the DATES branch September 18, 2018 07:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant