Problem:
Right now the Commons link constraint expects the value of the Statement to include the namespace of the page on Commons. This is however only true for Properties with datatype geoshape and tabular data. We should change the current checks to not assume the namespace to be included in the value except for Properties of datatype geoshape and tabular data.
Example:
- https://www.wikidata.org/wiki/Q21555912#Q21555912$E913B641-45F4-412C-9F5D-05DEE3FC072B <- this value is linking to the Creator namespace on Commons but does not include the namespace in the stored value. This causes it to trigger a constraint violation for the Commons link constraint.
BDD
GIVEN a Property with a Commons link constraint
AND a statement using that Property
(a)
AND the datatype is not tabular data or geoshape
WHEN the value does contain the namespace
THEN a constraint violation of the Commons link constraint is triggered
(b)
AND the datatype is tabular data or geoshape
WHEN the value does not contain the namespace
THEN a constraint violation of the Commons link constraint is triggered
Acceptance criteria:
- Commons link constraints deal with namespaces only in the way defined in the BDD
Original report:
The creator page on Commons https://commons.wikimedia.org/wiki/Creator:Louis_Huard_(1813-1874) is connected to the Wikidata item https://www.wikidata.org/wiki/Q21555912
This item has the property P1472 Commons creator page https://www.wikidata.org/wiki/Property:P1472 linking to the correct page. However, the constraint Commons link constraint https://www.wikidata.org/wiki/Property:P1472#P1472$51803ECB-1D7F-46CD-B21C-E66E2C5F076F doesn't recognise the link and displays the message "Commons link should exist."
This happens on some Items only (see also https://www.wikidata.org/wiki/Q28837128 )