shotgunsoftware / python-api

A Python-based library for accessing Flow Production Tracking API.
https://developer.shotgridsoftware.com/python-api
Other
306 stars 198 forks source link

'Task' field missing code/name in the API? #289

Closed josh-mission closed 1 year ago

josh-mission commented 1 year ago

When requesting Tasks via the API it doesn't seem to contain a field for the Task Name (often code in the API).

Below is what I get back when i query the tasks schema using:

schema = sg.schema_field_read('Task')
task_fields = list(schema.keys())

Result:

['pinned', 'time_logs_sum', 'step', 'inventory_date', 'notes', 'implicit', 'upstream_tasks', 'downstream_tasks', 'dependency_violation', 'task_template', 'time_percent_of_est', 'time_vs_est', 'splits', 'template_task', 'addressings_cc', 'sibling_tasks', 'split_durations', 'cached_display_name', 'sg_priority_1', 'sg_description', 'sg_sort_order', 'filmstrip_image', 'open_notes', 'open_notes_count', 'id', 'image_source_entity', 'image_blur_hash', 'workload', 'workload_per_day', 'workload_assignee_count', 'workload_per_day_per_assignee', 'sg_versions', 'start_date', 'updated_at', 'project', 'entity', 'created_by', 'sg_status_list', 'updated_by', 'est_in_mins', 'tags', 'color', 'due_date', 'content', 'duration', 'milestone', 'image', 'task_assignees', 'created_at', 'task_reviewers']

Is this a bug or by design for some reason?

MichaelSherwoodSC commented 1 year ago

The equivalent field for code when querying a Task entity with the API is content.

As for the reasoning of why this is the case, I'm not sure.

josh-mission commented 1 year ago

@MichaelSherwoodSC Thank you, not sure how I managed to miss that field!