Last modified: 2014-09-18 13:10:43 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T70729, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 68729 - Wikidata API for wbeditentity ignores order of claims when claims already exist?
Wikidata API for wbeditentity ignores order of claims when claims already exist?
Status: RESOLVED DUPLICATE of bug 57666
Product: MediaWiki extensions
Classification: Unclassified
WikidataRepo (Other open bugs)
unspecified
All All
: Normal normal (vote)
: ---
Assigned To: Wikidata bugs
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2014-07-28 12:05 UTC by bth-fan
Modified: 2014-09-18 13:10 UTC (History)
3 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments
Example query and response from server (21.46 KB, text/plain)
2014-07-28 12:05 UTC, bth-fan
Details

Description bth-fan 2014-07-28 12:05:46 UTC
Created attachment 16056 [details]
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.
Comment 1 Lydia Pintscher 2014-09-18 13:10:43 UTC
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 ***

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links