Page MenuHomePhabricator

View details of a deleted property used in a statement
Closed, ResolvedPublic5 Estimated Story Points


As a Wikibase user, I want to access the recent logs for a deleted property so that I can understand when the property was deleted and why.

There will be situations where a federated property that has been used to make a statement on the local Wikibase is later deleted on the source wiki. In an earlier story, we decided that deleted properties should be displayed as "Pxx (Deleted Property)". The Pxx should now be linked to the remnant of the property page on the source Wiki. This link should be formatted as links to other deleted pages (red).

Although local properties will not be possible in the MVP version of federated properties, we should change the current behavior for deleted local properties as well. The Pxx of a deleted local property should be linked to the remnant of the local property page to simplify accessing recent logs.

BDD (Scenario: View details of a deleted property)
Given The local item page displays a statement that was made using a deleted property
When I click on the hyperlinked Pxx of the deleted property
Then the Wikidata property page opens in my browser according to my default browser behavior

Event Timeline

@Samantha_Alipio_WMDE Should this be changing the behaviour for local properties as well?

Currently the standard behaviour is the following:

Changing it for all entities in Wikibase in general will be less work than trying to only do this for the federated properties case.

@Addshore Yes to changing the behavior for local properties. Aside from being less work, I see a benefit in third-party Wikibases in having the P number for any deleted property linked to its remnant page. In Wikidata, the property deletion process is fairly structured and includes time for debate and time for migrating values over to a replacement property. A third-party Wikibase may not follow that same process, so making it easier to access the recent logs for a deleted property that was used in a statement would likewise make it easier to uncover if a property deletion was done in error.

Sorry, when I say local properties, I meant to imply that we would thus also be changing this behaviour for
Thus Lydia probably needs a ping.

Got it! Ping @Lydia_Pintscher -- do you see an issue with what we're doing here, as it will impact how deleted properties used in statements are displayed on Wikidata? My take is since users on WD are taking care of migrating values for deleted properties before the deletion happens, this change shouldn't be visible to them.

I understand that what we're changing is just linking the Property ID. That should be fine for Wikidata as well, yeah. Since it is a link to a deleted page it should probably be a red link as for other links to non-existent pages?

Samantha_Alipio_WMDE renamed this task from View details of a deleted federated property used in a statement to View details of a deleted property used in a statement.May 28 2020, 11:56 AM
Samantha_Alipio_WMDE updated the task description. (Show Details)
Samantha_Alipio_WMDE set the point value for this task to 5.

NonExistingEntityIdHtmlFormatter is the class that does the formatting in this deleted case as far as we can see.
This is used in ItemPropertyIdHtmlLinkFormatter which ends up going through a chain of things and into EntityView down the snak templating.

While looking through the code we noticed that the "easy" way would also turn deleted items into links.

Is this desired?

We figured out an easy way to avoid needing to answer that question!

  • Create a NonExistingEntityIdHtmlFormatter that creates red links to entities when formatting them
  • Alter the formatter-factory-callback for WikibaseRepo.datatypes.php PT:wikibase-property to use the new linking formatted
    • Keeping the PY:wikibase-item formatter the same (not linking)

Tasks to follow

Addshore triaged this task as Medium priority.Jul 8 2020, 10:34 AM
Addshore claimed this task.

Resolved as it's in the Done column at the end of sprint 3 (start of sprint 4)