Page MenuHomePhabricator

Allow deletion of statement blocks with unsupported data types
Closed, ResolvedPublic

Description

We have this

The file page outputs all statements that have been associated with it, regardless of their data types.

We want this

It must be possible to delete statement blocks 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:T220614.png

  • statement with unsupported data type can be put into edit mode
  • entire statement block can be deleted
  • statement block is gone completely after refresh
  • it must not be possible to add more items to unsupported data types

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":"P740","datavalue":{"type":"globecoordinate","value":{"latitude":36.025155,"longitude":-113.788809,"globe":"http://www.wikidata.org/entity/Q2","precision":0.000001}}},"id":"M64624$f49ddd72-4bb4-5e41-f131-6819d56773f3","rank":"normal"})
});

Event Timeline

matthiasmullie renamed this task from Allow deleting of statement blocks with unsupported data types to Allow deletion of statement blocks with unsupported data types.
Restricted Application added a subscriber: Liuxinyu970226. · View Herald TranscriptApr 10 2019, 3:41 PM

Change 502516 had a related patch set uploaded (by Matthias Mullie; owner: Matthias Mullie):
[mediawiki/extensions/WikibaseMediaInfo@master] Handle statements with unsupported data types

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

Change 502516 merged by jenkins-bot:
[mediawiki/extensions/WikibaseMediaInfo@master] Handle statements with unsupported data types

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

Change 504028 had a related patch set uploaded (by Matthias Mullie; owner: Matthias Mullie):
[mediawiki/extensions/WikibaseMediaInfo@master] Don't display statement input field when datatype doesn't support it

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

Change 504028 merged by jenkins-bot:
[mediawiki/extensions/WikibaseMediaInfo@master] Don't display statement input field when datatype doesn't support it

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

Cparle updated the task description. (Show Details)Apr 17 2019, 2:33 PM

Ok on beta

Ok on test-commons

Ramsey-WMF added a subscriber: Ramsey-WMF.

Could you give this one a try too? 😺

matthiasmullie closed this task as Resolved.Apr 25 2019, 4:01 PM

Works for me!