User story
As a normal user
I want to be able go to the File page
And delete existing Q-item values for a non-depicts property
And add new Q-item values to a non-depicts property that already has values
We have this
Display of statement blocks for non-depicts statements
We want this
js to hook into non-depicts statement blocks and allow
- deleting existing value
- adding new value
- everything else we can already do for depicts (unless excluded below)
Not in scope:
- qualifiers
- properties with data types that are not 'wikibase-entity'
Acceptance Criteria
Test case set up at https://commons.wikimedia.beta.wmflabs.org/wiki/File:T219382.png
On the File page
- can add Q-item values for a property that is not 'depicts' and that already has Q-item values
- can delete values from a property that is not 'depicts' and that already has Q-item values
- can remove entire statement block for all statements
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":"P694","datavalue":{"type":"wikibase-entityid","value":{"id":"Q427329"}}},"id":"M64715$35020f2e-4e2c-c840-567f-457b497c8fcc","rank":"normal"}) });