Page MenuHomePhabricator

Wikidata API for wbeditentity ignores order of claims when claims already exist?
Closed, ResolvedPublic

Description

Author: bth-fan

Description:
Example query and response from server

First things first: I'm not sure if this bug is wikidata.org-specific, so feel free to move to another component.

The problem: I wanted to edit an entitiy in the wikidata.org database with the help of pywikibot and the wbeditentity API function. I wanted to overwrite existing claims or better said: I wanted to add qualifiers to existing claims and change the order of two claims, which used the same property. But to me it looks like the API ignores the changed order. Is this a bug? As a simple example, existing claims look like this:
P1: Q1234
P1: Q6789

I wanted to use wbeditentity to achieve this:
P1: Q6789

-> P99: foo (qualifier)
-> P100: bar (qualifier)

P1: Q1234

-> P99: baz (qualifier)
-> P100: bla (qualifier)

But with my API query it seems to keep the order of the already existing claims the same and only adds the qualifiers? I've attached an example query and the response of the wikidata.org server to this (I removed all unnecessary parts). Unfortunately it's not a minimal example, but I think by looking for 128109 (Q128109) and 571472 (Q571472) in the log you should see that the order in the API query and the response from the server is different.


Version: unspecified
Severity: normal

Attached:

Details

Reference
bz68729

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 22 2014, 3:27 AM
bzimport set Reference to bz68729.
bzimport added a subscriber: Unknown Object (MLST).

Odering in the API needs to be reworked. I am going to mark this as a dupe of the bug for that as hopefully that'll solve the issue.

  • This bug has been marked as a duplicate of bug 57666 ***