Page MenuHomePhabricator

Wikibase maintenance script
Open, Needs TriagePublicFeature

Description

Feature summary
In an discussion on the Wikibase Telegram group it came to my attention that some core maintenance of Wikibase needs to be done with a bot, but that bot is not openly available.

Use case(s) (list the steps that you performed to discover that problem, and describe the actual underlying problem which you want to solve. Do not describe only a solution):
In the discussed example it was about changing statement identifiers after an item was merged so that Blazegraph can find items under its new canonical id. There might be other use cases on maintenance of a Wikibase that need periodical checks and changes.

Benefits (why should this be implemented?):
Since the growth of multiple Wikibase instances the needs becomes greater to create accessible shared infrastructure and tools. This is one of them.

Related Objects

Event Timeline

Addshore subscribed.

Do you mean changing a statement from one property to another across a whole wikibase?

So more steps to reproduce:

Say if I merge Q2 into Q1 and I query all records containing statements with Q1 should items that refer to Q2 show up. It appears that https://www.wikidata.org/wiki/User:KrBot does the maintenance here. But no code is shared.

@Addshore does this help?

I think this issue should get more priority so I'll try to be extra clear :)

You have a Wikibase full of entities (e.g. Persons)
You have an item about a person 'Alice' (Q789)
Alice has a statement Father P90 'Bob' with item Q456
Q456 appears to be a duplicate of Q123
Q456 is merged into Q123

If I now query 'give me all persons where Bob is the father':
SELECT ?person WHERE {
?person wdt:90 wd:Q123 . #Q123 being the new Q-number for Bob
}
I do not get Alice. I only get Alice if I query
SELECT ?person WHERE {
?person wdt:90 wd:Q456 .
}

This can lead to dangerous false negatives. Less dangerous in the humanities but maybe in wikibases that related to gene research.