Jump to content

"Code" field for TaskTypes


Recommended Posts

  • 2 months later...
  • 3 months later...

To add to this one. I'd say that most of the 'types' things in ftrack should have a short name or 'code' field by which we could refer to it in the API.


Usecase for task status codes:

I have a daemon running that is responsible for changing statuses on task depending on what's happening with their versions. When i want to set a status using API I have to do something like this

status = version.getStatus()project = version.getParents()[-1]statuses = project.getTaskStatuses()task = version.getTask()if status.getName() == 'Approved':    task.setStatus(statuses[3])

Now I know that status 3 of this particular project is 'Complete', however this might not be true on another project, where we only have 3 task statuses in the schema. Hence it's really difficult to make things like this work across the board.


What I'd like to be doing is

status = version.getStatus()task = version.getTask()if status.getCode() == 'appr'   #or 'approved' or 'i like kittens' or whatever I set this status code to be in ftrack settings    task.setStatus('cmpl')      # or 'complete' or ... you get the gist. 

Pretty much the same as idea as being able to refer to a project by it's code when retrieving it by ftrack.getProject(code), but inverse.


Usecase for Task codes:

Mostly for creating folder structures. If we have a task type called motion graphics, I'd like it to be represented also as mograph, so I could get this code and use it as a folder name upon its generation. No I need to have a small dictionary containing task types and their corresponding short names, which is just a little annoying.


And as we are reaching for the sky already, it would be awesome if columns in spreadsheet view could change it's display from full name to this short code when scaled too small for full name to fit. We could get a lot of columns on the spreadsheet that way without really sacrificing readability.



Sooo to finish this up, how is this looking as far as implementation goes? :)

Link to comment
Share on other sites

  • 2 weeks later...
  • 1 month later...


This topic is now archived and is closed to further replies.

  • Create New...