Skip to content
Snippets Groups Projects
Commit f26ce604 authored by aydreeihn's avatar aydreeihn
Browse files

Issue: DB Error #1064 Queue Counts

This commit fixes an error where queue counts cannot be returned if the config saved for a queue is invalid. We try to build a query that does a count based on the criteria saved in the config, so when we try to build the query for an incorrectly saved config, the query we try to write looks something like this:

COUNT(DISTINCT CASE WHEN  THEN A1.`ticket_id` END) AS `q15`

Rather than trying to do a count for these, we should just skip over them so that no error is thrown since there is no way we would be able to count it anyway.

It is also possible for there to be more than 1 criteria defined, and if one of them is wrong, the same error will be thrown. We can check to see if there are multiple criteria, and if one is empty, we can skip that count as well.
parent 7578d5cd
No related branches found
No related tags found
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment