Announcement RTx::Statistics 0.1.7 available (was RE: [rt-users] blank pages after statistics install)
Trey Breckenridge
trey at ERC.MsState.Edu
Fri Dec 23 14:24:52 EST 2005
On 12/23/2005 11:41 AM, Trey Breckenridge wrote:
> I am not experiencing the crashing problem with Ticket Trends by Day
> that Rob Wilson pointed out. However, the data presented by that page
> is incorrect. According to that page, the number of tickets created is
> less than the number of tickets resolved -- which is obviously wrong,
> unless I am misunderstanding the basic premise of the page. As a
> point of comparison, the Time To Resolve page does correctly show the
> number of created tickets as equal to or larger than the number of resolved
> tickets. My guess is that the algorithm for calculating the number of
> tickets created is wrong on the Trends page, but I haven't yet looked at
> the code to verify that.
I found the problem. The logic for determining whether a ticket should be
counted as deleted or created was wrong. Here is a context patch to
correct the code:
*** share/html/RTx/Statistics/DayOfWeek/index.html Wed Dec 21 07:25:35 2005
--- local/html/RTx/Statistics/DayOfWeek/index.html Fri Dec 23 13:15:09 2005
***************
*** 143,157 ****
if($t->Status eq "resolved") {
$counts[(localtime($t->ResolvedObj->Unix))[6]]{resolved}++;
$Totals{resolved}++;
- } else {
- if($t->Status eq "deleted") {
- $counts[(localtime($t->LastUpdatedObj->Unix))[6]]{deleted}++;
- $Totals{deleted}++;
- } else {
- $counts[(localtime($t->CreatedObj->Unix))[6]]{created}++;
- $Totals{created}++;
- }
}
}
}
</%INIT>
--- 143,155 ----
if($t->Status eq "resolved") {
$counts[(localtime($t->ResolvedObj->Unix))[6]]{resolved}++;
$Totals{resolved}++;
}
+ if($t->Status eq "deleted") {
+ $counts[(localtime($t->LastUpdatedObj->Unix))[6]]{deleted}++;
+ $Totals{deleted}++;
+ }
+ $counts[(localtime($t->CreatedObj->Unix))[6]]{created}++;
+ $Totals{created}++;
}
}
</%INIT>
More information about the rt-users
mailing list