Erik Posted September 6, 2017 Report Share Posted September 6, 2017 When getting the link attribute of for example a task it contains the full name of the project. I think in most cases it would make more sense to include the name aka project code instead. And if replacing it is not an option please include both. Like this we have to do an additional query just to get the project code. Link to comment Share on other sites More sharing options...
Remus Avram Posted September 8, 2017 Report Share Posted September 8, 2017 Hi @Erik, if I may ask, for what do you use the link attribute? In most of the cases we are getting the project from a task like this: task["project"]["attribute"] Does this work for you? Link to comment Share on other sites More sharing options...
Erik Posted September 13, 2017 Author Report Share Posted September 13, 2017 We use it as a indicator of where in the tree structure you are at the moment like. '.'.join([foo.get('name') for foo in bar.get('link')]) gives for example Project.sequence.shot.task With the old api we do it in a recursive function using getParent and the end result is project.sequence.shot.task This is for a project where the Project name is Project and the Project code is project Link to comment Share on other sites More sharing options...
Remus Avram Posted September 13, 2017 Report Share Posted September 13, 2017 I see. We are doing like this to get the structure: while entity['parent'].entity_type != "Project": entities.append(entity['name']) entity = entity['parent'] Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.