- Edited
This is the first new queue since we upgraded to 1.17.
The sub-queue ticket count shows the number of tickets in the parent queue and not in the current sub-queue. Note that previously created sub-queues show the correct counts.
Example:
This is the first new queue since we upgraded to 1.17.
The sub-queue ticket count shows the number of tickets in the parent queue and not in the current sub-queue. Note that previously created sub-queues show the correct counts.
Example:
If you logout and back in does it still show incorrectly?
If it still shows incorrectly I'm curious if this patch will fix the issue for you:
diff --git a/include/class.search.php b/include/class.search.php
index f0b770f0..9d0cd0f3 100755
--- a/include/class.search.php
+++ b/include/class.search.php
@@ -992,12 +992,12 @@ class SavedQueue extends CustomQueue {
$counts['q'.$queue->getId()] = '-';
}
- try {
- $counts = array_merge($counts, $query->values()->one());
- } catch (Exception $ex) {
+ //try {
+ // $counts = array_merge($counts, $query->values()->one());
+ //} catch (Exception $ex) {
foreach ($queues as $q)
$counts['q'.$q->getId()] = $q->getTotal();
- }
+ //}
// Always cache the results
self::storeCounts($key, $counts, $ttl);
Cheers.
Thanks for this patch. I'm somewhat new with osTicket and have not applied a patch before. Could you give me the steps for applying it? I really appreciate it. Jerry
Open that file using any text editor and make the changes manually or use something like patch
command on linux. You can research guides online on how to accomplish this.
Cheers.
The patch corrected the problem. Thanks again. Jerry
In my case the mismatch in the count was due to open "sub/child" tickets
With the patch, the counts were not correct because we need to take into account agent visibility.
so by passing in the agent we can make sure its only counting the visible ones
$counts['q' . $q->getId()] = $q->getTotal($agent);
Using both recommendations in this thread resolved the issue for me. So to combine:
diff --git a/include/class.search.php b/include/class.search.php
index f0b770f0..9d0cd0f3 100755
--- a/include/class.search.php
+++ b/include/class.search.php
@@ -992,12 +992,12 @@ class SavedQueue extends CustomQueue {
$counts['q'.$queue->getId()] = '-';
}
- try {
- $counts = array_merge($counts, $query->values()->one());
- } catch (Exception $ex) {
+ //try {
+ // $counts = array_merge($counts, $query->values()->one());
+ //} catch (Exception $ex) {
foreach ($queues as $q)
- $counts['q'.$q->getId()] = $q->getTotal();
+ $counts['q'.$q->getId()] = $q->getTotal( $agent );
- }
+ //}
// Always cache the results
self::storeCounts($key, $counts, $ttl);