Page MenuHomePhabricator

Large numbers not handled properly in quantity qualifier field
Closed, ResolvedPublicBUG REPORT

Description

User story: N/A

We have this:

UPDATE: Per Cormac's notes in the comments, the issue seemed related to commas for quantities over a million. But now, if you try to enter a quantity over a million, it will either: a.) change the value to some lesser order of magnitude or b.) delete the value entirely.

In some specific (still unknown?) circumstances, when first viewing the Structured Data tab, a particular statement panel will not be in read mode by default, but edit mode.

Example file:
https://test-commons.wikimedia.org/wiki/File:This_is_an_awesome_screenshot.png

I've attempted to replicate this issue with other files, with no luck so far.

We want this:
When first reaching the Structured Data tab, all panels should be in read mode, not edit mode

Screenshots (if possible):

panel-edit-mode.gif (568×1 px, 612 KB)

Acceptance Criteria:

  • When first reaching the Structured Data tab, all panels should be in read mode, not edit mode

Event Timeline

Change 520734 had a related patch set uploaded (by Cparle; owner: Cparle):
[mediawiki/extensions/WikibaseMediaInfo@master] Use regex to replace commas in quantity value

https://gerrit.wikimedia.org/r/520734

Problem here was quantities with >1 commas - only the first was being replaced, and that made the javascript go screwy.

So before this fix if you add any statement and have a 'quantity' qualifier with a value >= 1 million then the panel will be in edit mode when you load the page. After this fix it should no longer happen

Change 520734 merged by jenkins-bot:
[mediawiki/extensions/WikibaseMediaInfo@master] Use regex to replace commas in quantity value

https://gerrit.wikimedia.org/r/520734

Ramsey-WMF renamed this task from [Test Commons] Some statement panels default to 'edit' mode to Large numbers not handled properly in quantity qualifier field.Jul 31 2019, 10:55 PM
Ramsey-WMF updated the task description. (Show Details)

@Cparle it would seem the fix didn't quite work :) I updated the ticket description. Please take a look as soon as you can.

@Ramsey-WMF Is this still broken for you? AFAICT, it works fine now.

Yes, this seems to have been magically fixed :) Tested on production and Beta, works fine. Closing it.