Last modified: 2014-09-29 12:53:47 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T72229, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 70229 - Store the badges of sitelinks in a queryable format
Store the badges of sitelinks in a queryable format
Status: NEW
Product: MediaWiki extensions
Classification: Unclassified
WikidataRepo (Other open bugs)
unspecified
All All
: Normal normal (vote)
: ---
Assigned To: Wikidata bugs
u=dev c=backend p=0
: need-volunteer
Depends on:
Blocks: 70209
  Show dependency treegraph
 
Reported: 2014-08-31 09:47 UTC by Bene*
Modified: 2014-09-29 12:53 UTC (History)
4 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Bene* 2014-08-31 09:47:21 UTC
The badges of sitelinks should be stored in another table to make them queryable. This table should contain a badge id and the sitelinks site and wiki. Alternativly, we can add the badges to the wb_items_per_site table but this might become tricky because there is a primary key on the siteid/page columns so we cannot create a new row for each badge but have to put them all into one value which then makes querying them harder and not really efficient.
Comment 1 Bene* 2014-09-27 14:52:46 UTC
I think this should get higher priority because it blocks removal of the badge templates from some Wikipedias. I want some discussion in the development team first how the database table should look like before we proceed with implementing this part of the badges.
Comment 2 Daniel Kinzler 2014-09-29 11:48:35 UTC
I'm not sure I agree that we need such a table (but I can be convinced). 

In any case, the basic structure should be:

 ( badge, siteId, page )

with the primary key covering all three fields, in this order. This allows us to efficiently find all pages that have a given badge, on all sites or a given site.

If we also want to be able to find all the badges associated with a given page (on a given site), we'd need another index covering ( siteId, page ). This would be useful if we wanted to show badges in listings of pages (e.g. add icons for special pages in the Special:Allpages listing.

For convenience, we may want to have a column for the associated item id. This would remove the need to join against wb_item_per_site in cases where we need to know the item ID. However, we generally don't care about the associated item in this context, do we?
Comment 3 Aude 2014-09-29 12:53:47 UTC
@daniel if we don't need such table, then how do you suggest we make badges / badge usage queryable?

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links