Skip to content
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

Chore: Workfile template name filters by correct task type #1042

Conversation

iLLiCiTiT
Copy link
Member

@iLLiCiTiT iLLiCiTiT commented Dec 10, 2024

Changelog Description

Use taskType instead of type key from task entity.

Additional info

Also added some typehints to the function.

Testing notes:

  1. Add new template to workfile templates in project anatomy, make sure the template is "different" from default one (e.g. add /test in the middle of directory path).
  2. Change ayon+settings://core/tools/Workfiles/workfile_template_profiles so it uses default template by default and the new template for task type of your choice (e.g. Modeling).
  3. Run DCC on task with used task type.
  4. The template from step 1. should be used instead of default for workfile path.

Resolves #1029

@iLLiCiTiT iLLiCiTiT added the type: bug Something isn't working label Dec 10, 2024
@iLLiCiTiT iLLiCiTiT self-assigned this Dec 10, 2024
@ynbot ynbot added the size/XS label Dec 10, 2024
@64qam
Copy link
Member

64qam commented Dec 10, 2024

  File "<string>", line 9, in <module>
  File "C:\Users\qam\AppData\Local\Ynput\AYON\addons\core_1.0.11+dev\ayon_core\pipeline\workfile\path_resolving.py", line 43, in get_workfile_template_key_from_context
    folder_entity = ayon_api.get_folder_by_path(
  File "c:\Program Files\Ynput\AYON 1.1.1\dependencies\ayon_api\_api.py", line 2543, in get_folder_by_path
    return con.get_folder_by_path(*args, **kwargs)
  File "c:\Program Files\Ynput\AYON 1.1.1\dependencies\ayon_api\server_api.py", line 4512, in get_folder_by_path
    for folder in folders:
  File "c:\Program Files\Ynput\AYON 1.1.1\dependencies\ayon_api\server_api.py", line 4434, in get_folders
    for parsed_data in query.continuous_query(self):
  File "c:\Program Files\Ynput\AYON 1.1.1\dependencies\ayon_api\graphql.py", line 378, in continuous_query
    raise GraphQlQueryFailed(
ayon_api.exceptions.GraphQlQueryFailed: GraphQl query Failed: Name 'PROJECT NAME' does not match regex '^[a-zA-Z0-9_]([a-zA-Z0-9_\.\-]*[a-zA-Z0-9_])?$' on item 'project' (Line 2 Column 3)```

@iLLiCiTiT iLLiCiTiT merged commit aee99ca into develop Dec 11, 2024
3 checks passed
@iLLiCiTiT iLLiCiTiT deleted the bugfix/1029-replace-task_entitygettype-with-task_entitygettasktype branch December 11, 2024 09:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
size/XS type: bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

replace task_entity.get("type") with task_entity.get("taskType")
3 participants