Last modified: 2014-08-06 20:03:02 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 T66815, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 64815 - Modify category.py to also update Wikidata on category rename
Modify category.py to also update Wikidata on category rename
Status: RESOLVED FIXED
Product: Pywikibot
Classification: Unclassified
category.py (Other open bugs)
core-(2.0)
All All
: Unprioritized normal
: ---
Assigned To: Ricordisamoa
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2014-05-04 10:20 UTC by Maarten Dammers
Modified: 2014-08-06 20:03 UTC (History)
2 users (show)

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


Attachments

Description Maarten Dammers 2014-05-04 10:20:04 UTC
At the moment when a category gets renamed the bot creates a new category and moves all the contents there. This creates a lot of disconnected wikidata items. See https://www.wikidata.org/wiki/User:Pasleim/Items_for_deletion/Category for a list.

What the bot should do:
1. Create the new category
2. Check if the old category is connected to a Wikidata item.
3. If that's the case update the sitelink to the new item
4. If the label in the language of the category is the same as the old category name, update that to the new category name
5. Start moving contents as usual
Comment 1 TeleComNasSprVen 2014-05-21 11:28:20 UTC
Actually, what I think we should do is simply create a new item for the new category name and delete the sitelink for the old one...
Comment 2 Maarten Dammers 2014-05-22 19:27:23 UTC
And creating a duplicate item? Why would we want to do that?
Comment 3 TeleComNasSprVen 2014-05-22 19:40:57 UTC
(In reply to Maarten Dammers from comment #2)
> And creating a duplicate item? Why would we want to do that?

Because the old item could contain a lot more sitelinks than just Commons, with varying labels as well. In your illustrated case you are assuming the Commons sitelink is the only one that exists, and that we could easily move the Commons sitelink and change the English label while say enwiki or another one decides to use a different label.
Comment 4 Gerrit Notification Bot 2014-07-22 23:13:10 UTC
Change 148539 had a related patch set uploaded by Ricordisamoa:
update Wikibase item on category rename

https://gerrit.wikimedia.org/r/148539
Comment 5 Gerrit Notification Bot 2014-08-06 19:40:41 UTC
Change 148539 merged by jenkins-bot:
update Wikibase item on category rename

https://gerrit.wikimedia.org/r/148539

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


Navigation
Links