maxlath / wikibase-cli

read and edit a Wikibase instance from the command line
MIT License
223 stars 24 forks source link

deprecation batch stopped, because it wants "named as" qualifier to be a monolingual string #128

Closed Jheald closed 3 years ago

Jheald commented 3 years ago

Hi Max,

I was trying to deprecate a batch of statements, but the batch stopped at https://www.wikidata.org/wiki/Q5544505#Q5544505$CFBEFF20-60B3-4124-A206-F70A4FD45082
with the command { "guid": "Q5544505$CFBEFF20-60B3-4124-A206-F70A4FD45082", "rank": "deprecated" } giving the error invalid monolingualtext value { property: 'P1476', value: 'George Sidney Shepherd, 1784–1858' }

This is odd on two counts: firstly the qualifier P1476 ("named as") takes string values, not monolingual text Secondly, if the statement already exists, it ought to be possible to deprecate it

maxlath commented 3 years ago

it seems that P1476 does have a datatype=monolingualtext

Which command were you using and which version?

maxlath commented 3 years ago

The internal serialization was loosing rich values (simplifying the mononlingual { text, language } into { value }, preserving those rich values seems to fix the problem.

Patch published in v15.2.2

maxlath commented 3 years ago

Closing this issue as this seems resolved, but feel welcome to reopen if that's not actually the case