Page MenuHomePhabricator

Category.py removes sortkeys
Closed, ResolvedPublic

Description

After moving categories on w:cs with category.py move there are no sortkeys.

In this diff you can see an example.

I tagged with high priority, since this bots work has to be fixed manually (usually in lots of categorized pages) since the sortkeys are important.

Event Timeline

Wesalius raised the priority of this task from to High.
Wesalius updated the task description. (Show Details)
Wesalius subscribed.
Restricted Application added subscribers: Aklapper, Unknown Object (MLST). · View Herald TranscriptApr 11 2015, 6:31 AM
Mpaa set Security to None.

Change 203565 had a related patch set uploaded (by Mpaa):
Do not remove sortkey using category.py move

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

Change 204991 had a related patch set uploaded (by John Vandenberg):
Fix replaceCategoryInPlace site

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

I think category move -inplace should be used to keep sortkey , and the default is to not keep the sort key. I've added some basic test cases to confirm that -inplace does keep the sortkey (and fixed a bug in the process).

Thanks for the fix. May I know, why would anyone want to remove sortkeys in categories that were very probably added manually?

Im not sure, and we can make changes to behaviour if there isnt any logic reason for the existing logic.

I think some category sortkeys become inappropriate if the category is moved because it changes its scope.

Change 204991 merged by jenkins-bot:
Fix replaceCategoryInPlace site

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

Change 203565 merged by jenkins-bot:
Do not remove sortkey using category.py move

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

Assumed Resolved now.
@Wesalius,let us know if not OK.