Skip to content

SG-41006 Fix alphabetical sorting issue introduced on v0.15.10#167

Open
carlos-villavicencio-adsk wants to merge 10 commits intoticket/SG-41003_case_insensitive_searchfrom
ticket/SG-41006_fix_alphabetical_sorting
Open

SG-41006 Fix alphabetical sorting issue introduced on v0.15.10#167
carlos-villavicencio-adsk wants to merge 10 commits intoticket/SG-41003_case_insensitive_searchfrom
ticket/SG-41006_fix_alphabetical_sorting

Conversation

@carlos-villavicencio-adsk
Copy link
Contributor

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 (content field) 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:

  • The MyTasksModel now loads and refreshes with default sorting by the content field (task name) in ascending order, ensuring tasks are listed alphabetically by name. [1] [2]
  • When filtering tasks by status, the results are also sorted by the content field in ascending order.
  • The default sort menu selection is updated to use the content field (task name) and ascending order, and the corresponding menu item is checked by default.

Automatic Sorting for Non-Custom Models:

  • In the entity tree proxy model, automatic alphabetical sorting is enabled for models that do not use custom sorting (i.e., non-MyTasksModel instances, such as Assets/Shots tabs).

@codecov
Copy link

codecov bot commented Feb 2, 2026

Codecov Report

❌ Patch coverage is 50.00000% with 10 lines in your changes missing coverage. Please review.
✅ Project coverage is 32.36%. Comparing base (23bf6ca) to head (33e2ca1).

Files with missing lines Patch % Lines
python/tk_multi_workfiles/browser_form.py 0.00% 8 Missing ⚠️
...i_workfiles/entity_tree/entity_tree_proxy_model.py 90.90% 1 Missing ⚠️
python/tk_multi_workfiles/file_form_base.py 0.00% 1 Missing ⚠️
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     
Flag Coverage Δ
Linux 32.36% <50.00%> (+0.50%) ⬆️
Python-3.10 32.37% <50.00%> (+0.50%) ⬆️
Python-3.11 32.37% <50.00%> (+0.50%) ⬆️
Python-3.9 32.37% <50.00%> (+0.50%) ⬆️
Windows 19.26% <50.00%> (+0.57%) ⬆️
macOS 32.36% <50.00%> (+0.50%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@carlos-villavicencio-adsk carlos-villavicencio-adsk requested a review from a team February 3, 2026 14:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants