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.
Loading
Please register or sign in to comment