Page MenuHomePhabricator

Erroneous digits in QuantityValue
Closed, ResolvedPublic


In Quick Statements, V2, the command

Q4115189 P1117 -1.23~0.35

(I added a link to here , since Phabricator's auto-link to is misleading)

triggers an edit that leads to a Wikidata quantity value


instead of the expected -1.23±0.35.

This looks similar to T119226, but since I can't see any scientific notation involvement, I am filing this separately for the moment.

Event Timeline

Daniel_Mietchen renamed this task from Superfluous digits in QuantityValue to Erroneous digits in QuantityValue.Jan 21 2017, 9:21 PM

Probably this is a bug of QuickStatements, whose bug is not tracking here, but at

Actually, the code repo is here:

I would assume that WMF Phabricator would be used to track bugs for WMF-hosted tools and WMF-hosted source code, but I don't know how...

I have logged the actual request sent out to Wikidata API:


It resulted in this edit:

I'll be happy to fix anything you can find wrong in the JSON I pass to the API. But it looks OK to me...

I can confirm the described behavior and uploaded a patch that aims to fix the underlying issue in the Wikibase code base, see

However, there is a super-trivial thing you can do, @Magnus: Please submit quantity values as strings, not numbers.





By coincidence, I submitted a patch for this on Saturday: {D911}.

BTW that seems to be the problem on QS v1 too. If the simple fix with strings above works, maybe can be ported to quick_statements.php too, so we won't get bad data from that one too.

hoo subscribed.

Just needs a data-values/number release now.

Change 425777 had a related patch set uploaded (by Hoo man; owner: Hoo man):
[mediawiki/extensions/Wikibase@master] Update data-values/number to 0.10.0

Change 425777 merged by jenkins-bot:
[mediawiki/extensions/Wikibase@master] Update data-values/number to 0.10.0

hoo removed a project: Patch-For-Review.