It’s important for us to know what time a ticket was tagged with a category (we use it for SLAs).
I have a brute force method I’m using now (cron jobbing all open tickets every 5mins)…
But wondering if GQL could solve this more elegantly.
I see now there is a created_at
and updated_at
inside the ticket_category
object…
BUT… those dates are when the category itself was created, NOT when the relationship to the ticket was created.
So the query I was trying to find is…
"Tell me all the tickets who had a ticket_category added to it within the last hour"
Is this possible?
The query below was my attempt, but its returning based on the date that category was created, initially (not in relation to the ticket)
query q($rrf:ReverseRelationFilter){
tickets( reverse_relation_filters:[$rrf]){
entities{
id, subject
ticket_categories{
entities{
id, name, updated_at, created_at
}
}
}
}}
Variables:
{
"rrf":{
"relation": "ticket_categories",
"search": [
{
"datetime_fields": [
{
"operator": "GT",
"attribute": "created_at",
"search_value": "2020-12-10 06:00:56"
}
]
}
]
}
}