-
Notifications
You must be signed in to change notification settings - Fork 63
Order tasks using anatomy #1512
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: develop
Are you sure you want to change the base?
Order tasks using anatomy #1512
Conversation
|
What does |
| self._last_project_name = project_name | ||
| self._last_folder_id = folder_id | ||
| # Load tools configuration for task display order | ||
| try: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This logic does not belong to UI. This is backend logic which should be received using controller, or the widget should have setter for it. I'm also not convinced if this has to be in settings.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If anatomy actually is using order for task types then the TaskItem should already have order stored on it, which would be filled in model.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Confirmed, that project anatomy is using the order. So, now I believe we should get rid of the settings.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, I can make these changes if you feel this could get merged:
- Respect MVC and move the logic to the model
- As @BigRoy pointed out, this becomes less useful when there are multiple Tasks of these types, and ordering them by their Type will not necessarily reflect the intended pipeline step order. However in the simple paradigm of Kitsu where Tasks and Task Types are one and the same, this is VERY useful.
Thoughts?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
AYON frontend already does sort it based on anatomy task types order. I believe we should follow that in pipeline tools too, without settings.
Without settings nothing has to be moved from the UI because it does what has to be done already.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Understood. I wonder if however studios who are used to it being alphabetical, as it is by default right now, might want to keep it the default approach? Without the ayon-core addon setting, they would be forced to order the Task Types in the Anatomy, creating a state which is not as complimentary to the production if they have different Tasks that are of the same type, but not consecutive etc.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we already had requests to change it this way. It is easier to add settings if someone complains than give the option and then try to remove the settings.
Co-authored-by: Jakub Trllo <[email protected]>

This pull request introduces configurable sorting for task display order in the
TasksWidget, allowing users to choose between "anatomy" and "alphabetical" sorting based on project settings. It also adds a new settings section for this configuration in the server-side tools settings model.TLDR: Sort Tasks in tools by alphanumerically OR by the order they are in the Anatomy, preserving a project's pipeline step order.
Task Display Order Configuration
TasksWidgetto read thetask_display_ordersetting from project settings.TASK_SORT_ROLEdata role and updated task item population to set sorting values based on the selected display order. [1] [2]lessThanmethod in the proxy model to sort tasks according to the configured order, handling both string and numeric values.Server-side Settings Model Updates
ToolsDisplayModelwith atask_display_orderfield to the server-side tools settings (tools.py), allowing global configuration of task sorting.displaysettings section into the global tools settings and provided a default value fortask_display_order. [1] [2]