Query attributes in an EventLogEntry's "meta" field?

Hey Folks,

We’re updating our Time Tracking system to handle tasks changing hands between artists on a given day. Does anyone know a way to query attributes that live in an event log entries “meta” field? We think it would be handy for tracking the handoff.

Thanks!

Same way as querying any other info, just query for EventLogEntry and it’s meta field.

Hi Ricardo, here is what our developer is telling me is happening when he tries to do this, (Ids hashed out for safety)


This is the error when I try just using meta as any other field to find if any meta fields in the event log contains the name John Doe:

shotgun_api3.shotgun.Fault: API read() EventLogEntry.meta’s ‘serializable’ data type cannot be used in a filter:
{“path”=>“meta”, “relation”=>“contains”, “values”=>[“John Doe”]}

Then if I tried to filter by an attribute within the meta field, I get errors like these:

  • attempt to filter by meta.attribute_change.removed (because the meta “type” is “attribute_change” I followed the same convention as filter any other entity field):

shotgun_api3.shotgun.Fault: API read() EventLogEntry.meta.attribute_change.removed doesn’t exist: {“path”=>“meta.attribute_change.removed”,
“relation”=>“is”,
“values”=>
[{“type”=>“HumanUser”,
“id”=>121,
“groups”=>
[{“id”=>###, “name”=>“Dev”, “type”=>“Group”},
{“id”=>###, “name”=>“Testing”, “type”=>“Group”}],
“name”=>“John Doe”}]}

  • attempt to filter without the “type” field (i.e. just meta.removed):

shotgun_api3.shotgun.Fault: API read() EventLogEntry.meta.removed doesn’t exist:
{“path”=>“meta.removed”,
“relation”=>“is”,
“values”=>
[{“type”=>“HumanUser”,
“id”=>###,
“groups”=>
[{“id”=>###, “name”=>“Dev”, “type”=>“Group”},
{“id”=>170, “name”=>“Testing”, “type”=>“Group”}],
“name”=>“John Doe”}]}

Ah I see, no I dont think you can query like that since the meta field contains a json dictionary of the event metadata.

You’ll either have to process all events like the Event Daemon does or prefilter with the available fields and then process all those subset of events.

1 Like