It is nice to have a similar feature in clients, so that we can use haswbstatement together with incategory/hastemplate to find items needing improving. Obviously this should not be named haswbstatement.
Description
Related Objects
- Mentioned In
- T294637: Improvements to the WikibaseLexeme Lua interface (before full rollout)
T185313: mw.wikibase.entity:getBacklinks (lua API in wikibase client) - Mentioned Here
- T185313: mw.wikibase.entity:getBacklinks (lua API in wikibase client)
P585 Somebody subscripted core deployment branches?!??!?!?!!!!????
P1001 flaky salt on labs
Event Timeline
Can you let us know more about what you're wanting to do and any use cases that you're wanting to solve?
I have described the use case in description; having this may let us check what's missing or incorrect in Wikidata.
Can you go into more detail on what a 'client equivalent' is in this case? We're having trouble knowing what this is for and why it's needed (use cases and sample steps to recreate would be great to have).
For example we want to find all article using a specific template (e.g. Template:Infobox person) but missing P31=Q5 in Wikidata. (PetScan can be used in many, but not all, cases)
I am not sure how this would be done from the client though. Lua? Right now I don't see any mw.wikibase API that does such things. Is it meant to be new API? How do you think it should look like?
To present a more concrete use case for such functionality, @debt, the infoboxes on articles for localities in India have slots listing the national/state-level parliamentary constituencies that they're located in along with the current representatives in those constituencies. These slots, which at one point were prefilled from Wikidata, no longer work since the misuses of P585 ("point in time") on the Wikidata items for those constituencies that allowed such information to be present have been removed. In the absence of a property linking a Wikidata item about a constituency to an election involving that constituency (to use the example of a national-level constituency in Kolkata, from Q3348171 to Q63988950), it would be helpful to obtain a list of items which link back to an item for a constituency via something akin to haswbstatement (in this case, to continue using the previous example, akin to haswbstatement:P1001=Q3348171) so that the most recent election information (from electorate size to successful candidates to numbers of spoilt votes, to name a few facts) could thus be obtained with a few more steps.
FYI: I made a comment on T185313: mw.wikibase.entity:getBacklinks (lua API in wikibase client) about the possibility creating a query service that stores results in Tabular Data (which is available at page render time via Extension:JsonConfig and Scribunto Lua).