2

How are people handling time log scripting?

We're building button-click time logging into a custom web interface and a couple of apps (Nuke & Silhouette) and I realized that the current Shotgun API doesn't handle time but instead duration for the time logs. How are others solving this? Are you creating custom entities for start and stop time, then using Python to calculate the difference and then filling in the duration in the existing time log? If so, what are you putting those custom entities against? I'm thinking I could create new entities for the time log itself and make the duration zero until I have both start and stop times filled in. Has anyone figured out a way to get Shotgun to do the calculations instead of external scripts, maybe using timecode fields? How do you handle it if someone skips the start or stop step? I believe editing logs is verbotten for artists in Shotgun.

5 条评论

  • 0
    Avatar
    Ben Hadden

    <<Are you creating custom entities for start and stop time, then using Python to calculate the difference and then filling in the duration in the existing time log?>>

    Hi Dennis, I'm assuming you mean custom fields here?  This has been the use I've heard about the most.  You'd add two Date/Time fields, one for start, and one for stop.  When the artist clicks "Start" in their app, you'd create a new TIme Log with Start filled in and Duration set to zero.  Then when they click "Stop", you set the Step field and have a script calculate the difference, writing that value to Duration.  We're starting to think more and more about this, so hearing your thoughts on how this could be even better would be great.  Anyone else tracking time this way (based on start/stop in an app)?

  • 0
    Avatar
    Armando Ricalde

    Yes we do, but not yet for Tasks, I mean we're using a Custom Entity as a Time Clock, so we developed a PyQt app running on a netbook at the front door so everybody can check in/out their entrance. Username/password at the moment but we'll work on a fingerprint reader version.

    We have an event driven trigger to fill the Hours field (float) when someone leaves, and a cron script to fill abscent people at the end of the day.

    But regarding the main topic of this thread I've been thinking about an automatic start/stop way to fill Time logs for Tasks; a daemon monitoring which windows has the focus, if its Maya for example, it saves the start hour in a log file in the user's home (just in case it crashes), after some defined time of mouse/tablet/keboard inactivity, it calculates the time difference against the saved hour and log it to SG to the corresponding Task that matches the artist and days assigned, it also stops and log the time when the window focus changes to another unrelated app after some time, when there is mouse/tablet/keboard activity again with focus on the right app it starts over again. I know it sounds too ambitious and there are a lot of things to consider beyond my simplistic explanation, but everything starts with a dream.

     

  • 0
    Avatar
    Dennis Serras

    What we've been developing is a front end for Shotgun that is for the artist, with tools to open/create files. When they open/create a file that has been assigned to them, it sends a start signal to a time log against the task. When they're done, they have the option to "pause" the shot which allows them to return to it later, or to "submit" it which creates a new task for their lead or supervisor to check the shot. Those options send a stop signal to the time log, at which point the duration is calculated. What this means, though, is that we have to anticipate almost any need for an artist to open a shot or there won't be a time log created... Man, are we living in task hell.

  • 0
    Avatar
    Ben Hadden

    @Armando, that sounds like an awesome setup.  I can't wait to see the "awesome" setup you're imagining.

    @Dennis, when we move into time cards, there will definitely be an option to log time against non-Task related work.  For example, if you're in meetings for 4 hours of the day (as many of us are), you'll be able to link your time to a meeting category.  We haven't decided if we'll loosely type this time (just tag it) or strongly type it (create an entity and link it to the time log), but I'd be curious to hear your thoughts.  Do you often have to report on things like how much time was dedicated to meetings, and if so, do you report on specific types of meetings or just meetings in general?

  • 0
    Avatar
    Dennis Serras

    @Ben, we already have a setup for tracking the artists' total time, so we're focusing on their shot time at the moment. Since it's an automated system, I will get to see to see how much time the artists are actually spending on truly billable time. If we find that there's a lot of unaccounted time, then we might start tracking meetings and training so we can get a sense of whether the artists are spending too much of their time on non-billable work...

请先登录再写评论。