ProfessionalWiki / AutomatedValues

Wikibase extension that allows defining rules to automatically set labels or aliases based on Statement values
https://wikibase.consulting/automating-values-in-wikibase
GNU General Public License v2.0
6 stars 3 forks source link

Unexpected behaviour – expected taking preferred rank over normal rank #8

Closed mzeinstra closed 2 years ago

mzeinstra commented 2 years ago

Not sure if this is a feature or a bug :)

When adding multiple last names I expected that the extension would take the first 'preferred rank' instead is taking the first entered statement.

Screenshot 2022-03-28 at 13 49 38

I expected this case to resolve the Label to "M wrong use of last name".

JeroenDeDauw commented 2 years ago

Should be fixed now.

Apparently I got confused when I wrote the docs. I never implemented this for building values. Only for finding matching entities via entity criteria.

mzeinstra commented 2 years ago

Is this deployed on the demo wiki?

If so, not sure it is fixed (or if not part of spec). In the attached screenshot I expected the label to be 'Pjotr Hein' instead of 'Piet Hein', since Piet is the deprecated rank and Pjotr is the preferred rank.

Screenshot 2022-03-28 at 15 12 03
JeroenDeDauw commented 2 years ago

Oh sorry, not deployed yet :)

JeroenDeDauw commented 2 years ago

Should now be deployed on the demo wiki

mzeinstra commented 2 years ago

Not sure if this works as expected.

Do both ranks of First Name and Last Name need to be in sync? In the screenshot below I expect Pjotr Hein, not Pjotr. Also the aliases appear to be missing but present in Q4

Screenshot 2022-03-28 at 15 51 25
JeroenDeDauw commented 2 years ago

I implemented the wrong behavior. The statements where getting filtered on the item level. So as soon as there was on preferred one, all normal ones would be ignored, even if there are no preferred ones for the same property.

Fixed now by filtering on statement group level. Deployment started, will be live in ~5 min.

mzeinstra commented 2 years ago

Verified that this now works as expected.