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):

Acceptance Criteria:

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

Details

Related Gerrit Patches:
mediawiki/extensions/WikibaseMediaInfo : masterUse regex to replace commas in quantity value

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald TranscriptJul 3 2019, 6:33 PM

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

Cparle moved this task from Doing to Code Review on the Structured-Data-Team-Current-Work board.EditedJul 4 2019, 12:25 PM

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 updated the task description. (Show Details)Jul 31 2019, 10:57 PM
Ramsey-WMF moved this task from Needs QA to Doing on the Structured-Data-Team-Current-Work board.
Restricted Application added a project: Multimedia. · View Herald TranscriptAug 10 2019, 11:54 PM

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

Ramsey-WMF closed this task as Resolved.Aug 26 2019, 7:00 PM

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