Page MenuHomePhabricator

Allow deletion of qualifiers with unsupported data types
Closed, ResolvedPublic

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

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.
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

Screen Shot 2019-05-28 at 9.04.16 AM.png (1×1 px, 372 KB)

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

Screen Shot 2019-05-28 at 9.07.13 AM.png (311×647 px, 37 KB)

@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).
Screen Shot 2019-05-29 at 7.02.02 PM.png (1×1 px, 379 KB)

✅ AC3: qualifier with unsupported data type can be deleted

Screen Shot 2019-05-29 at 7.02.53 PM.png (1×1 px, 364 KB)

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

Screen Shot 2019-05-29 at 7.04.24 PM.png (1×1 px, 365 KB)

Screen Shot 2019-05-29 at 7.04.17 PM.png (1×1 px, 356 KB)

@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)
Ramsey-WMF claimed this task.
Ramsey-WMF subscribed.

We may need to revisit this once other statements is out, but existing functionality is fine for what we have now.