SG-41006 Fix alphabetical sorting issue introduced on v0.15.10#167
Conversation
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## ticket/SG-41003_case_insensitive_search #167 +/- ##
===========================================================================
+ Coverage 31.86% 32.36% +0.50%
===========================================================================
Files 68 68
Lines 7658 7671 +13
===========================================================================
+ Hits 2440 2483 +43
+ Misses 5218 5188 -30
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Pull request overview
This PR fixes an alphabetical sorting regression introduced in v0.15.10 by implementing default alphabetical sorting by task name across the workfiles browser UI. The changes ensure tasks are consistently sorted alphabetically when loading, refreshing, and filtering, while also enabling automatic sorting for non-custom models.
Changes:
- Set default sorting to task name (content field) in ascending order for My Tasks
- Enable automatic alphabetical sorting for Assets/Shots tabs via proxy model
- Add "Task Name" as the first sortable field in the configuration
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| tests/test_entity_tree_proxy_model.py | Adds comprehensive unit tests for EntityTreeProxyModel sorting behavior |
| python/tk_multi_workfiles/file_form_base.py | Updates My Tasks model initialization to sort by task name by default |
| python/tk_multi_workfiles/entity_tree/entity_tree_proxy_model.py | Implements automatic alphabetical sorting for non-MyTasksModel instances |
| python/tk_multi_workfiles/browser_form.py | Sets task name as default sort field and updates UI accordingly |
| info.yml | Adds Task Name field to sortable fields configuration |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This requires #166 to be merged first due to some fixing on code style CI.
This pull request introduces improvements to the default sorting behavior for tasks in the workfiles browser UI. The main change is to ensure that tasks are now sorted alphabetically by their name (
contentfield) by default, both when loading and refreshing task lists, and when interacting with sorting menus. Additionally, automatic alphabetical sorting is enabled for models that do not use custom sorting logic.Default Sorting Improvements:
MyTasksModelnow loads and refreshes with default sorting by thecontentfield (task name) in ascending order, ensuring tasks are listed alphabetically by name. [1] [2]contentfield in ascending order.contentfield (task name) and ascending order, and the corresponding menu item is checked by default.Automatic Sorting for Non-Custom Models:
MyTasksModelinstances, such as Assets/Shots tabs).