Shotgun Time Logs - Filter Artists With Missing Logs

I hope this makes sense.

We log artists work at our studio and sometimes they can be on multiple different tasks each day. Each week we look back at the logs to check that every artists has a total of 5 days logged.

At the moment, we’ve got a weekly filter set up and we check each artists page individually. We’ve recently gotten a lot more artists and I was wondering if there was a way I could use the filters to make this process a little quicker.

Is there a way of setting up a filter that flags which artists are missing logs for each 5 day period?

4 Likes

Hey Ninetynineflake,

Welcome to the community! Thanks for your question.

Shotgun doesn’t have a great way to filter for the absence of something (e.g. missing Time Logs in this instance), but I may have a solution that would help you here.

What if you could scan a list of your artists and have a column showing the sum of their logged time for the week? You could then scan down the list and find anyone with less than 5 days worth of time logged and follow up with them.

To do this you’d create a query field on the Person entity like so:

Let me know how if that helps!

8 Likes

@mmoshev has written a script for us that does that, quite handy :slight_smile:

4 Likes

That’s pretty exciting! Would it be possible to share it? Also, is that a tricky script to implement? Our pipeline department is pretty busy at the moment, so this would fall on me as it would only be the other runners and myself that would be using it.

2 Likes

It is not particularly tricky, you get a list of all active users (or all users on a shot/project), then the list of everyone who has logged time in the period X and take the difference between the two.
Will share the script shortly.
We use it from a Shotgun AMI which gives us some context (be it task, shot, etc.).

5 Likes

I am trying to create something similar. I want a single Time Log report that compiles all tasks and the total time logged for all members of a project team in the past week. A team time sheet.

Using the method above almost works for me - however I cannot define “Current Person” as described in https://support.shotgunsoftware.com/hc/en-us/articles/219030968#filtering

The only “variable” value that seems possible is leaving the value blank and it defaults to “Me” - what I’m looking for is to pull the user from the grouping and total their hours in this column.

image

Assuming this is not possible, or only possible with non-OOTB dev, then I would appreciate suggestions on creating a document/page that gets a similar team-time-sheet result.

Note in the sample log above, I had to rename the default “Duration” column to “Time Logged” which is actually what it displays. (NOT the Task Duration that drives the Gantt chart)

Hi @reml,

From the screenshot, it looks like you’re creating this new field on the Time Log entity.
To get what you are looking for, it would be best to create this field on the Person entity.
That way, the field will query all time logs across tasks for each person and display only their respective totals (on any People page).

Hope that helps!

Regards,
Govind.

2 Likes

Thank you! I missed that detail in the original example. Of course the possible queries are based on the entity it’s attached to. I created it on the general People page, then added it to my Time Log page via Linked Fields/Person/MyCustomQuery.

Interestingly, the original bad query, that only reported the current user (Me) does show the summed time log value in the shaded row with the Person’s name - which makes it easy to scan when reviewing the report. The new functioning query does not - marking that cell as Not Currently Supported.
image

Regardless, my report now does what I need well enough and I understand a little more about how Shotgun thinks. Thanks!

Glad I could help, @reml!

I believe that Shotgun should be able to summarise the new field you have created as well.
Could you please right click on the new field’s header and check what option is enabled under Summary?
I think the right one to enable in your Time Log page would be Summary > Average.
(Min or Max should also give you the same result in this particular case)

1 Like

Thanks, @Govind_Kalburgi!

It’s already a summary (sum) which gives me the total of all time logged for that person - which is the value I want. I preferred having the result shown in the shaded row with the user’s name, but that’s not critical -I was just wondering why one query included the value in some rows while the other query did not.

Here is the script that we are using. You can probably adapt it to your own needs:
timelog.py (3.2 KB)

2 Likes

Hi @reml, the shaded row is actually a Page (Column) Summary - and this is turned off by default for some fields. You can turn it on by doting this - Right Click > Summary > Average:
image

3 Likes

Brilliant. It’s not clear that you can do this for multiple columns, but I’ve played with it now and get it. Thanks @Govind_Kalburgi!

3 Likes

Thanks @mmoshev - scripting is the next step for me once I get the basics under control for my students - I appreciate the share!

2 Likes