Page MenuHomePhabricator

Allow deletion of qualifiers with unsupported data types
Open, NormalPublic

Description

We have this

The file page displays all qualifiers that have been associated with the statements, regardless of their data types.

We want this

It must be possible to delete qualifiers with unsupported data types so that we can fight vandalism.

Acceptance Criteria

Test case set up at https://commons.wikimedia.beta.wmflabs.org/wiki/File:T220617.png

  • statement with a qualifier with unsupported data type can be put into edit mode
  • statement with a qualifier whose property has an unsupported data type can be changed to a property with a supported data type, and a value submitted
  • qualifier with unsupported data type can be deleted
  • qualifier with unsupported data type is gone completely after submitting deletion & refreshing page

Note: ideally, deletion can only be tested once - after that, it's gone...
To add anew, execute this from JS console, while logged in:

(new mw.Api()).postWithEditToken({
	action: 'wbsetclaim',
	format: 'json',
	claim: JSON.stringify({"type":"statement","mainsnak":{"snaktype":"value","property":"P245962","datavalue":{"type":"wikibase-entityid","value":{"id":"Q427329"}}},"id":"M64627$f49ddd72-4bb4-5e41-f132-6819d56773f3","qualifiers":{"P740":[{"snaktype":"value","property":"P740","datavalue":{"type":"globecoordinate","value":{"latitude":36.025155,"longitude":-113.788809,"globe":"http://www.wikidata.org/entity/Q2","precision":0.000001}}}]},"qualifiers-order":["P740"],"rank":"normal"})
});

QA Results

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald TranscriptApr 10 2019, 3:04 PM
Restricted Application added a subscriber: Liuxinyu970226. · View Herald TranscriptApr 10 2019, 3:46 PM

Change 502491 had a related patch set uploaded (by Matthias Mullie; owner: Matthias Mullie):
[mediawiki/extensions/WikibaseMediaInfo@master] Gracefully handle unsupported qualifiers

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

Change 502491 merged by jenkins-bot:
[mediawiki/extensions/WikibaseMediaInfo@master] Gracefully handle unsupported qualifiers

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

Ramsey-WMF moved this task from Untriaged to Next up on the Multimedia board.Apr 15 2019, 7:35 PM
Ramsey-WMF triaged this task as Normal priority.
Ramsey-WMF moved this task from To Do to Doing on the SDC Engineering board.May 10 2019, 5:08 PM
Edtadros reassigned this task from Edtadros to Cparle.Thu, May 30, 2:07 AM
Edtadros added subscribers: Cparle, Edtadros.

Test Result

Status: ❓ Needs Clarification
OS: macOS Mojave
Browser: Chrome
Device: MBP

Test Artifact(s):

QA Steps

Test case set up at https://commons.wikimedia.beta.wmflabs.org/wiki/File:T220617.png

✅ AC1: statement with a qualifier with unsupported data type can be put into edit mode

❓ AC2: statement with a qualifier with unsupported data type can be changed and submitted


@Cparle: To satisfy this acceptance criterion am I supposed to be able to modify the coordinate location with a supported data type? If so this fails because that field is read-only (see above). I can change the qualifier to something other than coordinate location and modify the data (as shown below).

✅ AC3: qualifier with unsupported data type can be deleted

✅ AC4: qualifier with unsupported data type is gone completely after submitting deletion & refreshing page

Edtadros updated the task description. (Show Details)Thu, May 30, 2:09 AM

@Edtadros what you describe for AC2 is correct behaviour. I'll update the AC, and move this to 'verify on production'

Cparle updated the task description. (Show Details)Thu, May 30, 11:43 AM
Cparle moved this task from Needs QA to Verify on Production on the Multimedia-Current-Work board.
Cparle removed Cparle as the assignee of this task.