D, [2024-10-23T09:45:35.198032#1553560-150440] DEBUG -- : Permission Exists? (1.1ms) SELECT 1 AS one FROM "permissions" INNER JOIN "permissions_roles" ON "permissions"."id" = "permissions_roles"."permission_id" INNER JOIN "roles" ON "permissions_roles"."role_id" = "roles"."id" INNER JOIN "roles_users" ON "roles"."id" = "roles_users"."role_id" WHERE "roles_users"."user_id" = $1 AND "roles"."active" = $2 AND "permissions"."active" = $3 AND "permissions"."name" IN ($4, $5) LIMIT $6 [["user_id", 922], ["active", true], ["active", true], ["name", "ticket"], ["name", "ticket.agent"], ["LIMIT", 1]]
D, [2024-10-23T09:45:35.198928#1553560-150440] DEBUG -- : Permission Load (0.4ms) SELECT "permissions".* FROM "permissions" WHERE "permissions"."name" = $1 LIMIT $2 [["name", "ticket.customer"], ["LIMIT", 1]]
D, [2024-10-23T09:45:35.200859#1553560-150440] DEBUG -- : Permission Exists? (1.0ms) SELECT 1 AS one FROM "permissions" INNER JOIN "permissions_roles" ON "permissions"."id" = "permissions_roles"."permission_id" INNER JOIN "roles" ON "permissions_roles"."role_id" = "roles"."id" INNER JOIN "roles_users" ON "roles"."id" = "roles_users"."role_id" WHERE "roles_users"."user_id" = $1 AND "roles"."active" = $2 AND "permissions"."active" = $3 AND "permissions"."name" IN ($4, $5) LIMIT $6 [["user_id", 922], ["active", true], ["active", true], ["name", "ticket"], ["name", "ticket.customer"], ["LIMIT", 1]]
D, [2024-10-23T09:45:35.201968#1553560-150440] DEBUG -- : CACHE Organization Pluck (0.0ms) SELECT "organizations"."id" FROM "organizations" INNER JOIN "organizations_users" ON "organizations"."id" = "organizations_users"."organization_id" WHERE "organizations_users"."user_id" = $1 ORDER BY "organizations"."id" ASC [["user_id", 922]]
D, [2024-10-23T09:45:35.203457#1553560-150440] DEBUG -- : Organization Load (0.6ms) SELECT "organizations".* FROM "organizations" WHERE "organizations"."id" IN ($1, $2) ORDER BY "organizations"."id" ASC [["id", 2], ["id", 132]]
D, [2024-10-23T09:45:35.204682#1553560-150440] DEBUG -- : CACHE Organization Load (0.0ms) SELECT "organizations".* FROM "organizations" WHERE "organizations"."id" IN ($1, $2) ORDER BY "organizations"."id" ASC [["id", 2], ["id", 132]]
D, [2024-10-23T09:45:35.207306#1553560-150440] DEBUG -- : Ticket Count (1.8ms) SELECT COUNT(*) FROM (SELECT DISTINCT "tickets".* FROM "tickets" WHERE (tickets.customer_id = 922 OR tickets.organization_id = 2 OR tickets.organization_id = 132) AND ((("tickets"."state_id" IN ('11','2','1','7','3')) AND ("tickets"."organization_id" IN (2,132)))) AND (tickets.customer_id = 922 OR tickets.organization_id = 2 OR tickets.organization_id = 132) ORDER BY "tickets"."state_id", "tickets"."created_at" DESC LIMIT $1) subquery_for_count [["LIMIT", 2000]]
D, [2024-10-23T09:45:35.209120#1553560-150440] DEBUG -- : Ticket Load (1.3ms) SELECT DISTINCT "tickets".* FROM "tickets" WHERE (tickets.customer_id = 922 OR tickets.organization_id = 2 OR tickets.organization_id = 132) AND ((("tickets"."state_id" IN ('11','2','1','7','3')) AND ("tickets"."organization_id" IN (2,132)))) AND (tickets.customer_id = 922 OR tickets.organization_id = 2 OR tickets.organization_id = 132) ORDER BY "tickets"."state_id", "tickets"."created_at" DESC LIMIT $1 OFFSET $2 [["LIMIT", 10], ["OFFSET", 0]]
D, [2024-10-23T09:45:35.211427#1553560-150440] DEBUG -- : Organization Load (0.5ms) SELECT "organizations".* FROM "organizations" WHERE "organizations"."id" = $1 ORDER BY "organizations"."id" ASC LIMIT $2 [["id", 132], ["LIMIT", 1]]
D, [2024-10-23T09:45:35.214477#1553560-150440] DEBUG -- : Ticket::State Load (0.5ms) SELECT "ticket_states".* FROM "ticket_states" WHERE "ticket_states"."id" = $1 LIMIT $2 [["id", 1], ["LIMIT", 1]]
D, [2024-10-23T09:45:35.215845#1553560-150440] DEBUG -- : Ticket::StateType Load (0.5ms) SELECT "ticket_state_types".* FROM "ticket_state_types" WHERE "ticket_state_types"."id" = $1 LIMIT $2 [["id", 1], ["LIMIT", 1]]
D, [2024-10-23T09:45:35.217352#1553560-150440] DEBUG -- : CACHE Organization Load (0.0ms) SELECT "organizations".* FROM "organizations" WHERE "organizations"."id" = $1 ORDER BY "organizations"."id" ASC LIMIT $2 [["id", 132], ["LIMIT", 1]]
D, [2024-10-23T09:45:35.219210#1553560-150440] DEBUG -- : CACHE Ticket::State Load (0.0ms) SELECT "ticket_states".* FROM "ticket_states" WHERE "ticket_states"."id" = $1 LIMIT $2 [["id", 1], ["LIMIT", 1]]
D, [2024-10-23T09:45:35.219864#1553560-150440] DEBUG -- : CACHE Ticket::StateType Load (0.0ms) SELECT "ticket_state_types".* FROM "ticket_state_types" WHERE "ticket_state_types"."id" = $1 LIMIT $2 [["id", 1], ["LIMIT", 1]]
D, [2024-10-23T09:45:35.221097#1553560-150440] DEBUG -- : CACHE Organization Load (0.0ms) SELECT "organizations".* FROM "organizations" WHERE "organizations"."id" = $1 ORDER BY "organizations"."id" ASC LIMIT $2 [["id", 132], ["LIMIT", 1]]
D, [2024-10-23T09:45:35.222745#1553560-150440] DEBUG -- : CACHE Ticket::State Load (0.0ms) SELECT "ticket_states".* FROM "ticket_states" WHERE "ticket_states"."id" = $1 LIMIT $2 [["id", 1], ["LIMIT", 1]]
D, [2024-10-23T09:45:35.223347#1553560-150440] DEBUG -- : CACHE Ticket::StateType Load (0.0ms) SELECT "ticket_state_types".* FROM "ticket_state_types" WHERE "ticket_state_types"."id" = $1 LIMIT $2 [["id", 1], ["LIMIT", 1]]
D, [2024-10-23T09:45:35.224640#1553560-150440] DEBUG -- : CACHE Organization Load (0.0ms) SELECT "organizations".* FROM "organizations" WHERE "organizations"."id" = $1 ORDER BY "organizations"."id" ASC LIMIT $2 [["id", 132], ["LIMIT", 1]]
D, [2024-10-23T09:45:35.226303#1553560-150440] DEBUG -- : CACHE Ticket::State Load (0.0ms) SELECT "ticket_states".* FROM "ticket_states" WHERE "ticket_states"."id" = $1 LIMIT $2 [["id", 1], ["LIMIT", 1]]
D, [2024-10-23T09:45:35.227178#1553560-150440] DEBUG -- : CACHE Ticket::StateType Load (0.0ms) SELECT "ticket_state_types".* FROM "ticket_state_types" WHERE "ticket_state_types"."id" = $1 LIMIT $2 [["id", 1], ["LIMIT", 1]]
D, [2024-10-23T09:45:35.228384#1553560-150440] DEBUG -- : CACHE Organization Load (0.0ms) SELECT "organizations".* FROM "organizations" WHERE "organizations"."id" = $1 ORDER BY "organizations"."id" ASC LIMIT $2 [["id", 132], ["LIMIT", 1]]
D, [2024-10-23T09:45:35.230004#1553560-150440] DEBUG -- : CACHE Ticket::State Load (0.0ms) SELECT "ticket_states".* FROM "ticket_states" WHERE "ticket_states"."id" = $1 LIMIT $2 [["id", 1], ["LIMIT", 1]]
D, [2024-10-23T09:45:35.230598#1553560-150440] DEBUG -- : CACHE Ticket::StateType Load (0.0ms) SELECT "ticket_state_types".* FROM "ticket_state_types" WHERE "ticket_state_types"."id" = $1 LIMIT $2 [["id", 1], ["LIMIT", 1]]
D, [2024-10-23T09:45:35.231842#1553560-150440] DEBUG -- : CACHE Organization Load (0.0ms) SELECT "organizations".* FROM "organizations" WHERE "organizations"."id" = $1 ORDER BY "organizations"."id" ASC LIMIT $2 [["id", 132], ["LIMIT", 1]]
D, [2024-10-23T09:45:35.233440#1553560-150440] DEBUG -- : CACHE Ticket::State Load (0.0ms) SELECT "ticket_states".* FROM "ticket_states" WHERE "ticket_states"."id" = $1 LIMIT $2 [["id", 1], ["LIMIT", 1]]
D, [2024-10-23T09:45:35.234043#1553560-150440] DEBUG -- : CACHE Ticket::StateType Load (0.0ms) SELECT "ticket_state_types".* FROM "ticket_state_types" WHERE "ticket_state_types"."id" = $1 LIMIT $2 [["id", 1], ["LIMIT", 1]]
D, [2024-10-23T09:45:35.235608#1553560-150440] DEBUG -- : CACHE Organization Load (0.0ms) SELECT "organizations".* FROM "organizations" WHERE "organizations"."id" = $1 ORDER BY "organizations"."id" ASC LIMIT $2 [["id", 132], ["LIMIT", 1]]
D, [2024-10-23T09:45:35.237224#1553560-150440] DEBUG -- : CACHE Ticket::State Load (0.0ms) SELECT "ticket_states".* FROM "ticket_states" WHERE "ticket_states"."id" = $1 LIMIT $2 [["id", 1], ["LIMIT", 1]]
D, [2024-10-23T09:45:35.237858#1553560-150440] DEBUG -- : CACHE Ticket::StateType Load (0.0ms) SELECT "ticket_state_types".* FROM "ticket_state_types" WHERE "ticket_state_types"."id" = $1 LIMIT $2 [["id", 1], ["LIMIT", 1]]
D, [2024-10-23T09:45:35.239038#1553560-150440] DEBUG -- : CACHE Organization Load (0.0ms) SELECT "organizations".* FROM "organizations" WHERE "organizations"."id" = $1 ORDER BY "organizations"."id" ASC LIMIT $2 [["id", 132], ["LIMIT", 1]]
D, [2024-10-23T09:45:35.240734#1553560-150440] DEBUG -- : CACHE Ticket::State Load (0.0ms) SELECT "ticket_states".* FROM "ticket_states" WHERE "ticket_states"."id" = $1 LIMIT $2 [["id", 1], ["LIMIT", 1]]
D, [2024-10-23T09:45:35.241336#1553560-150440] DEBUG -- : CACHE Ticket::StateType Load (0.0ms) SELECT "ticket_state_types".* FROM "ticket_state_types" WHERE "ticket_state_types"."id" = $1 LIMIT $2 [["id", 1], ["LIMIT", 1]]
D, [2024-10-23T09:45:35.242555#1553560-150440] DEBUG -- : CACHE Organization Load (0.0ms) SELECT "organizations".* FROM "organizations" WHERE "organizations"."id" = $1 ORDER BY "organizations"."id" ASC LIMIT $2 [["id", 132], ["LIMIT", 1]]
D, [2024-10-23T09:45:35.244180#1553560-150440] DEBUG -- : CACHE Ticket::State Load (0.0ms) SELECT "ticket_states".* FROM "ticket_states" WHERE "ticket_states"."id" = $1 LIMIT $2 [["id", 1], ["LIMIT", 1]]
D, [2024-10-23T09:45:35.244860#1553560-150440] DEBUG -- : CACHE Ticket::StateType Load (0.0ms) SELECT "ticket_state_types".* FROM "ticket_state_types" WHERE "ticket_state_types"."id" = $1 LIMIT $2 [["id", 1], ["LIMIT", 1]]
D, [2024-10-23T09:45:35.248437#1553560-150440] DEBUG -- : Permission Exists? (1.4ms) SELECT 1 AS one FROM "permissions" INNER JOIN "permissions_roles" ON "permissions"."id" = "permissions_roles"."permission_id" INNER JOIN "roles" ON "permissions_roles"."role_id" = "roles"."id" INNER JOIN "roles_users" ON "roles"."id" = "roles_users"."role_id" WHERE "roles_users"."user_id" = $1 AND "roles"."active" = $2 AND "permissions"."active" = $3 AND "permissions"."name" IN ($4, $5, $6) LIMIT $7 [["user_id", 922], ["active", true], ["active", true], ["name", "ticket"], ["name", "ticket.customer"], ["name", "ticket.agent"], ["LIMIT", 1]]
D, [2024-10-23T09:45:35.250288#1553560-150440] DEBUG -- : Organization Exists? (0.6ms) SELECT 1 AS one FROM "organizations" WHERE "organizations"."id" IN ($1, $2) AND "organizations"."shared" = $3 LIMIT $4 [["id", 2], ["id", 132], ["shared", true], ["LIMIT", 1]]
D, [2024-10-23T09:45:35.251876#1553560-150440] DEBUG -- : User Exists? (0.7ms) SELECT 1 AS one FROM "users" WHERE "users"."active" = $1 AND "users"."out_of_office" = $2 AND "users"."out_of_office_replacement_id" = $3 AND (out_of_office_start_at <= '2024-10-23' AND out_of_office_end_at >= '2024-10-23') LIMIT $4 [["active", true], ["out_of_office", true], ["out_of_office_replacement_id", 922], ["LIMIT", 1]]
D, [2024-10-23T09:45:35.256818#1553560-150440] DEBUG -- : Overview Load (3.1ms) SELECT DISTINCT "overviews".* FROM "overviews" INNER JOIN "overviews_roles" ON "overviews_roles"."overview_id" = "overviews"."id" INNER JOIN "roles" ON "roles"."id" = "overviews_roles"."role_id" INNER JOIN "roles_users" ON "roles_users"."role_id" = "roles"."id" INNER JOIN "users" ON "users"."id" = "roles_users"."user_id" LEFT OUTER JOIN "overviews_users" ON "overviews_users"."overview_id" = "overviews"."id" LEFT OUTER JOIN "users" "users_overviews" ON "users_overviews"."id" = "overviews_users"."user_id" WHERE "overviews"."active" = $1 AND "roles"."active" = $2 AND "users"."id" = $3 AND "users"."active" = $4 AND ("overviews_users"."user_id" = $5 OR "overviews_users"."user_id" IS NULL) AND "overviews"."out_of_office" != $6 ORDER BY "overviews"."prio" ASC, "overviews"."name" ASC LIMIT $7 OFFSET $8 [["active", true], ["active", true], ["id", 922], ["active", true], ["user_id", 922], ["out_of_office", true], ["LIMIT", 100], ["OFFSET", 0]]
D, [2024-10-23T09:45:35.258956#1553560-150440] DEBUG -- : Role Pluck (0.6ms) SELECT "roles"."id" FROM "roles" INNER JOIN "overviews_roles" ON "roles"."id" = "overviews_roles"."role_id" WHERE "overviews_roles"."overview_id" = $1 [["overview_id", 39]]
D, [2024-10-23T09:45:35.260358#1553560-150440] DEBUG -- : User Pluck (0.5ms) SELECT "users"."id" FROM "users" INNER JOIN "overviews_users" ON "users"."id" = "overviews_users"."user_id" WHERE "overviews_users"."overview_id" = $1 [["overview_id", 39]]
D, [2024-10-23T09:45:35.261475#1553560-150440] DEBUG -- : CACHE User Load (0.0ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT $2 [["id", 922], ["LIMIT", 1]]
D, [2024-10-23T09:45:35.262764#1553560-150440] DEBUG -- : CACHE Organization Pluck (0.0ms) SELECT "organizations"."id" FROM "organizations" INNER JOIN "organizations_users" ON "organizations"."id" = "organizations_users"."organization_id" WHERE "organizations_users"."user_id" = $1 ORDER BY "organizations"."id" ASC [["user_id", 922]]
D, [2024-10-23T09:45:35.264093#1553560-150440] DEBUG -- : CACHE (0.0ms) SELECT COUNT(*) AS "size", MAX("object_manager_attributes"."updated_at") AS timestamp FROM "object_manager_attributes" WHERE "object_manager_attributes"."active" = $1 AND "object_manager_attributes"."editable" = $2 AND "object_manager_attributes"."object_lookup_id" = $3 [["active", true], ["editable", true], ["object_lookup_id", 1]]
D, [2024-10-23T09:45:35.265662#1553560-150440] DEBUG -- : CACHE Organization Load (0.0ms) SELECT "organizations".* FROM "organizations" WHERE "organizations"."id" IN ($1, $2) ORDER BY "organizations"."id" ASC [["id", 2], ["id", 132]]
D, [2024-10-23T09:45:35.268100#1553560-150440] DEBUG -- : Ticket Count (1.6ms) SELECT COUNT(*) FROM (SELECT DISTINCT "tickets".* FROM "tickets" WHERE (tickets.customer_id = 922 OR tickets.organization_id = 2 OR tickets.organization_id = 132) AND ((("tickets"."state_id" IN ('12','4','8','7')) AND ("tickets"."organization_id" IN (2,132)))) ORDER BY "tickets"."organization_id", "tickets"."created_at" DESC) subquery_for_count
D, [2024-10-23T09:45:35.269510#1553560-150440] DEBUG -- : CACHE Role Pluck (0.0ms) SELECT "roles"."id" FROM "roles" INNER JOIN "overviews_roles" ON "roles"."id" = "overviews_roles"."role_id" WHERE "overviews_roles"."overview_id" = $1 [["overview_id", 10]]
D, [2024-10-23T09:45:35.270333#1553560-150440] DEBUG -- : CACHE User Pluck (0.0ms) SELECT "users"."id" FROM "users" INNER JOIN "overviews_users" ON "users"."id" = "overviews_users"."user_id" WHERE "overviews_users"."overview_id" = $1 [["overview_id", 10]]
D, [2024-10-23T09:45:35.271260#1553560-150440] DEBUG -- : CACHE User Load (0.0ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT $2 [["id", 922], ["LIMIT", 1]]
D, [2024-10-23T09:45:35.272421#1553560-150440] DEBUG -- : CACHE Organization Pluck (0.0ms) SELECT "organizations"."id" FROM "organizations" INNER JOIN "organizations_users" ON "organizations"."id" = "organizations_users"."organization_id" WHERE "organizations_users"."user_id" = $1 ORDER BY "organizations"."id" ASC [["user_id", 922]]
D, [2024-10-23T09:45:35.273728#1553560-150440] DEBUG -- : CACHE (0.0ms) SELECT COUNT(*) AS "size", MAX("object_manager_attributes"."updated_at") AS timestamp FROM "object_manager_attributes" WHERE "object_manager_attributes"."active" = $1 AND "object_manager_attributes"."editable" = $2 AND "object_manager_attributes"."object_lookup_id" = $3 [["active", true], ["editable", true], ["object_lookup_id", 1]]
D, [2024-10-23T09:45:35.275140#1553560-150440] DEBUG -- : CACHE Organization Load (0.0ms) SELECT "organizations".* FROM "organizations" WHERE "organizations"."id" IN ($1, $2) ORDER BY "organizations"."id" ASC [["id", 2], ["id", 132]]
D, [2024-10-23T09:45:35.277215#1553560-150440] DEBUG -- : Ticket Count (1.3ms) SELECT COUNT(*) FROM (SELECT DISTINCT "tickets".* FROM "tickets" WHERE (tickets.customer_id = 922 OR tickets.organization_id = 2 OR tickets.organization_id = 132) AND ((("tickets"."state_id" IN ('11','2','1','7','3')) AND ("tickets"."organization_id" IN (2,132)))) ORDER BY "tickets"."state_id", "tickets"."created_at" DESC) subquery_for_count
D, [2024-10-23T09:45:35.278981#1553560-150440] DEBUG -- : Role Pluck (0.5ms) SELECT "roles"."id" FROM "roles" INNER JOIN "overviews_roles" ON "roles"."id" = "overviews_roles"."role_id" WHERE "overviews_roles"."overview_id" = $1 [["overview_id", 55]]
D, [2024-10-23T09:45:35.280275#1553560-150440] DEBUG -- : User Pluck (0.4ms) SELECT "users"."id" FROM "users" INNER JOIN "overviews_users" ON "users"."id" = "overviews_users"."user_id" WHERE "overviews_users"."overview_id" = $1 [["overview_id", 55]]
D, [2024-10-23T09:45:35.281185#1553560-150440] DEBUG -- : CACHE User Load (0.0ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT $2 [["id", 922], ["LIMIT", 1]]
D, [2024-10-23T09:45:35.282633#1553560-150440] DEBUG -- : CACHE Organization Pluck (0.0ms) SELECT "organizations"."id" FROM "organizations" INNER JOIN "organizations_users" ON "organizations"."id" = "organizations_users"."organization_id" WHERE "organizations_users"."user_id" = $1 ORDER BY "organizations"."id" ASC [["user_id", 922]]
D, [2024-10-23T09:45:35.283733#1553560-150440] DEBUG -- : CACHE (0.0ms) SELECT COUNT(*) AS "size", MAX("object_manager_attributes"."updated_at") AS timestamp FROM "object_manager_attributes" WHERE "object_manager_attributes"."active" = $1 AND "object_manager_attributes"."editable" = $2 AND "object_manager_attributes"."object_lookup_id" = $3 [["active", true], ["editable", true], ["object_lookup_id", 1]]
D, [2024-10-23T09:45:35.285132#1553560-150440] DEBUG -- : CACHE Organization Load (0.0ms) SELECT "organizations".* FROM "organizations" WHERE "organizations"."id" IN ($1, $2) ORDER BY "organizations"."id" ASC [["id", 2], ["id", 132]]
D, [2024-10-23T09:45:35.287173#1553560-150440] DEBUG -- : Ticket Count (1.3ms) SELECT COUNT(*) FROM (SELECT DISTINCT "tickets".* FROM "tickets" WHERE (tickets.customer_id = 922 OR tickets.organization_id = 2 OR tickets.organization_id = 132) AND (((("tickets"."state_id" IS NULL OR "tickets"."state_id" NOT IN ('12','4','8','7'))) AND ("tickets"."organization_id" IN (2,132)))) ORDER BY "tickets"."state_id", "tickets"."created_at" DESC) subquery_for_count
D, [2024-10-23T09:45:35.288766#1553560-150440] DEBUG -- : Role Pluck (0.4ms) SELECT "roles"."id" FROM "roles" INNER JOIN "overviews_roles" ON "roles"."id" = "overviews_roles"."role_id" WHERE "overviews_roles"."overview_id" = $1 [["overview_id", 57]]
D, [2024-10-23T09:45:35.289950#1553560-150440] DEBUG -- : User Pluck (0.4ms) SELECT "users"."id" FROM "users" INNER JOIN "overviews_users" ON "users"."id" = "overviews_users"."user_id" WHERE "overviews_users"."overview_id" = $1 [["overview_id", 57]]
D, [2024-10-23T09:45:35.290782#1553560-150440] DEBUG -- : CACHE User Load (0.0ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT $2 [["id", 922], ["LIMIT", 1]]
D, [2024-10-23T09:45:35.292090#1553560-150440] DEBUG -- : CACHE Organization Pluck (0.0ms) SELECT "organizations"."id" FROM "organizations" INNER JOIN "organizations_users" ON "organizations"."id" = "organizations_users"."organization_id" WHERE "organizations_users"."user_id" = $1 ORDER BY "organizations"."id" ASC [["user_id", 922]]
D, [2024-10-23T09:45:35.293120#1553560-150440] DEBUG -- : CACHE (0.0ms) SELECT COUNT(*) AS "size", MAX("object_manager_attributes"."updated_at") AS timestamp FROM "object_manager_attributes" WHERE "object_manager_attributes"."active" = $1 AND "object_manager_attributes"."editable" = $2 AND "object_manager_attributes"."object_lookup_id" = $3 [["active", true], ["editable", true], ["object_lookup_id", 1]]
D, [2024-10-23T09:45:35.294445#1553560-150440] DEBUG -- : CACHE Organization Load (0.0ms) SELECT "organizations".* FROM "organizations" WHERE "organizations"."id" IN ($1, $2) ORDER BY "organizations"."id" ASC [["id", 2], ["id", 132]]
D, [2024-10-23T09:45:35.296427#1553560-150440] DEBUG -- : Ticket Count (1.3ms) SELECT COUNT(*) FROM (SELECT DISTINCT "tickets".* FROM "tickets" WHERE (tickets.customer_id = 922 OR tickets.organization_id = 2 OR tickets.organization_id = 132) AND (((("tickets"."state_id" IS NULL OR "tickets"."state_id" NOT IN ('11'))) AND ("tickets"."organization_id" IN (2,132)))) ORDER BY "tickets"."priority_id", "tickets"."created_at" DESC) subquery_for_count
D, [2024-10-23T09:45:35.298107#1553560-150440] DEBUG -- : Role Pluck (0.5ms) SELECT "roles"."id" FROM "roles" INNER JOIN "overviews_roles" ON "roles"."id" = "overviews_roles"."role_id" WHERE "overviews_roles"."overview_id" = $1 [["overview_id", 58]]
D, [2024-10-23T09:45:35.299310#1553560-150440] DEBUG -- : User Pluck (0.4ms) SELECT "users"."id" FROM "users" INNER JOIN "overviews_users" ON "users"."id" = "overviews_users"."user_id" WHERE "overviews_users"."overview_id" = $1 [["overview_id", 58]]
D, [2024-10-23T09:45:35.300474#1553560-150440] DEBUG -- : CACHE User Load (0.0ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT $2 [["id", 922], ["LIMIT", 1]]
D, [2024-10-23T09:45:35.301608#1553560-150440] DEBUG -- : CACHE Organization Pluck (0.0ms) SELECT "organizations"."id" FROM "organizations" INNER JOIN "organizations_users" ON "organizations"."id" = "organizations_users"."organization_id" WHERE "organizations_users"."user_id" = $1 ORDER BY "organizations"."id" ASC [["user_id", 922]]
D, [2024-10-23T09:45:35.302646#1553560-150440] DEBUG -- : CACHE (0.0ms) SELECT COUNT(*) AS "size", MAX("object_manager_attributes"."updated_at") AS timestamp FROM "object_manager_attributes" WHERE "object_manager_attributes"."active" = $1 AND "object_manager_attributes"."editable" = $2 AND "object_manager_attributes"."object_lookup_id" = $3 [["active", true], ["editable", true], ["object_lookup_id", 1]]
D, [2024-10-23T09:45:35.303942#1553560-150440] DEBUG -- : CACHE Organization Load (0.0ms) SELECT "organizations".* FROM "organizations" WHERE "organizations"."id" IN ($1, $2) ORDER BY "organizations"."id" ASC [["id", 2], ["id", 132]]
D, [2024-10-23T09:45:35.304678#1553560-150440] DEBUG -- : CACHE Ticket Count (0.0ms) SELECT COUNT(*) FROM (SELECT DISTINCT "tickets".* FROM "tickets" WHERE (tickets.customer_id = 922 OR tickets.organization_id = 2 OR tickets.organization_id = 132) AND ((("tickets"."state_id" IN ('11','2','1','7','3')) AND ("tickets"."organization_id" IN (2,132)))) ORDER BY "tickets"."state_id", "tickets"."created_at" DESC) subquery_for_count
D, [2024-10-23T09:45:35.306155#1553560-150440] DEBUG -- : User Load (0.7ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 [["id", 932]]
D, [2024-10-23T09:45:35.307464#1553560-150440] DEBUG -- : Permission Load (0.5ms) SELECT "permissions".* FROM "permissions" WHERE "permissions"."name" = $1 LIMIT $2 [["name", "admin.*"], ["LIMIT", 1]]
D, [2024-10-23T09:45:35.310049#1553560-150440] DEBUG -- : Permission Exists? (1.2ms) SELECT 1 AS one FROM "permissions" INNER JOIN "permissions_roles" ON "permissions"."id" = "permissions_roles"."permission_id" INNER JOIN "roles" ON "permissions_roles"."role_id" = "roles"."id" INNER JOIN "roles_users" ON "roles"."id" = "roles_users"."role_id" WHERE "roles_users"."user_id" = $1 AND "roles"."active" = $2 AND "permissions"."active" = $3 AND ("permissions"."name" = $4 OR permissions.name LIKE 'admin.%') LIMIT $5 [["user_id", 922], ["active", true], ["active", true], ["name", "admin"], ["LIMIT", 1]]
D, [2024-10-23T09:45:35.313196#1553560-150440] DEBUG -- : Organization Load (0.7ms) SELECT "organizations".* FROM "organizations" WHERE "organizations"."id" = $1 ORDER BY "organizations"."id" ASC [["id", 132]]
D, [2024-10-23T09:45:35.314371#1553560-150440] DEBUG -- : Permission Load (0.5ms) SELECT "permissions".* FROM "permissions" WHERE "permissions"."name" = $1 LIMIT $2 [["name", "admin.organization"], ["LIMIT", 1]]
D, [2024-10-23T09:45:35.316460#1553560-150440] DEBUG -- : Permission Exists? (1.1ms) SELECT 1 AS one FROM "permissions" INNER JOIN "permissions_roles" ON "permissions"."id" = "permissions_roles"."permission_id" INNER JOIN "roles" ON "permissions_roles"."role_id" = "roles"."id" INNER JOIN "roles_users" ON "roles"."id" = "roles_users"."role_id" WHERE "roles_users"."user_id" = $1 AND "roles"."active" = $2 AND "permissions"."active" = $3 AND "permissions"."name" IN ($4, $5, $6, $7) LIMIT $8 [["user_id", 922], ["active", true], ["active", true], ["name", "admin"], ["name", "admin.organization"], ["name", "ticket"], ["name", "ticket.agent"], ["LIMIT", 1]]
D, [2024-10-23T09:45:35.317964#1553560-150440] DEBUG -- : Ticket::State Load (0.5ms) SELECT "ticket_states".* FROM "ticket_states" WHERE "ticket_states"."id" = $1 [["id", 1]]
D, [2024-10-23T09:45:35.319638#1553560-150440] DEBUG -- : Group Load (0.6ms) SELECT "groups".* FROM "groups" WHERE "groups"."id" = $1 [["id", 4]]
D, [2024-10-23T09:45:35.320795#1553560-150440] DEBUG -- : Permission Load (0.4ms) SELECT "permissions".* FROM "permissions" WHERE "permissions"."name" = $1 LIMIT $2 [["name", "admin.group"], ["LIMIT", 1]]
D, [2024-10-23T09:45:35.322801#1553560-150440] DEBUG -- : Permission Exists? (1.1ms) SELECT 1 AS one FROM "permissions" INNER JOIN "permissions_roles" ON "permissions"."id" = "permissions_roles"."permission_id" INNER JOIN "roles" ON "permissions_roles"."role_id" = "roles"."id" INNER JOIN "roles_users" ON "roles"."id" = "roles_users"."role_id" WHERE "roles_users"."user_id" = $1 AND "roles"."active" = $2 AND "permissions"."active" = $3 AND "permissions"."name" IN ($4, $5) LIMIT $6 [["user_id", 922], ["active", true], ["active", true], ["name", "admin"], ["name", "admin.group"], ["LIMIT", 1]]
D, [2024-10-23T09:45:35.324727#1553560-150440] DEBUG -- : Ticket Exists? (0.8ms) SELECT 1 AS one FROM "tickets" WHERE "tickets"."customer_id" = $1 AND "tickets"."group_id" = $2 LIMIT $3 [["customer_id", 922], ["group_id", 4], ["LIMIT", 1]]
D, [2024-10-23T09:45:35.326864#1553560-150440] DEBUG -- : CACHE Ticket Exists? (0.0ms) SELECT 1 AS one FROM "tickets" WHERE "tickets"."customer_id" = $1 AND "tickets"."group_id" = $2 LIMIT $3 [["customer_id", 922], ["group_id", 4], ["LIMIT", 1]]
D, [2024-10-23T09:45:35.328434#1553560-150440] DEBUG -- : CACHE Ticket Exists? (0.0ms) SELECT 1 AS one FROM "tickets" WHERE "tickets"."customer_id" = $1 AND "tickets"."group_id" = $2 LIMIT $3 [["customer_id", 922], ["group_id", 4], ["LIMIT", 1]]
D, [2024-10-23T09:45:35.330051#1553560-150440] DEBUG -- : CACHE Ticket Exists? (0.0ms) SELECT 1 AS one FROM "tickets" WHERE "tickets"."customer_id" = $1 AND "tickets"."group_id" = $2 LIMIT $3 [["customer_id", 922], ["group_id", 4], ["LIMIT", 1]]
D, [2024-10-23T09:45:35.331630#1553560-150440] DEBUG -- : CACHE Ticket Exists? (0.0ms) SELECT 1 AS one FROM "tickets" WHERE "tickets"."customer_id" = $1 AND "tickets"."group_id" = $2 LIMIT $3 [["customer_id", 922], ["group_id", 4], ["LIMIT", 1]]
D, [2024-10-23T09:45:35.333527#1553560-150440] DEBUG -- : CACHE Ticket Exists? (0.0ms) SELECT 1 AS one FROM "tickets" WHERE "tickets"."customer_id" = $1 AND "tickets"."group_id" = $2 LIMIT $3 [["customer_id", 922], ["group_id", 4], ["LIMIT", 1]]
D, [2024-10-23T09:45:35.335088#1553560-150440] DEBUG -- : CACHE Ticket Exists? (0.0ms) SELECT 1 AS one FROM "tickets" WHERE "tickets"."customer_id" = $1 AND "tickets"."group_id" = $2 LIMIT $3 [["customer_id", 922], ["group_id", 4], ["LIMIT", 1]]
D, [2024-10-23T09:45:35.336683#1553560-150440] DEBUG -- : CACHE Ticket Exists? (0.0ms) SELECT 1 AS one FROM "tickets" WHERE "tickets"."customer_id" = $1 AND "tickets"."group_id" = $2 LIMIT $3 [["customer_id", 922], ["group_id", 4], ["LIMIT", 1]]
D, [2024-10-23T09:45:35.338256#1553560-150440] DEBUG -- : CACHE Ticket Exists? (0.0ms) SELECT 1 AS one FROM "tickets" WHERE "tickets"."customer_id" = $1 AND "tickets"."group_id" = $2 LIMIT $3 [["customer_id", 922], ["group_id", 4], ["LIMIT", 1]]
D, [2024-10-23T09:45:35.339446#1553560-150440] DEBUG -- : Ticket::StateType Load (0.6ms) SELECT "ticket_state_types".* FROM "ticket_state_types" WHERE "ticket_state_types"."id" = $1 [["id", 1]]
D, [2024-10-23T09:45:35.341828#1553560-150440] DEBUG -- : Setting Load (0.5ms) SELECT "settings".* FROM "settings" WHERE "settings"."area" = $1 ORDER BY "settings"."name" ASC [["area", "Transaction::Backend::Sync"]]
I, [2024-10-23T09:45:35.342183#1553560-150440] INFO -- : Completed 200 OK in 195ms (Views: 0.8ms | ActiveRecord: 43.4ms | Allocations: 51442)
Best Regards,