[rt-users] Another script question

Mathew Snyder theillien at yahoo.com
Wed Apr 18 07:01:54 EDT 2007


I, more-or-less, have this working.  It runs and gathers my data and does all of
its wonderful calculations printing it out to the file I want it to.  However, a
strange thing is occurring.  When the script runs it keep track of how many
tickets there are for each environment for each day.  I use this number to
figure out the rough average time spent on each environment during each day.

I'm finding though, that the script is "finding" more tickets than RT itself
does.  For instance, suppose my script finds 3 tickets for Company A on
2007-04-12.  It increments the hash: $ticCount{2007-04-12}{Company A} += 1;
Then prints it out at the end.  However if I do a search in RT for tickets that
were last updated on that same date for that same environment, I can end up with
fewer tickets or, sometimes, more tickets.  In fact, sometimes, they don't end
up in the final list at all.

I've inserted a print statement that will output the date, environment and
ticket number so that I can grep it and find how many times an environment shows
up on a particular day.  I just did this and found I already have one
environment that shows up but isn't even in the final output.

Why might this be happening?  Attached is my latest version.


Mathew

Stephen Turner wrote:
> At Friday 4/13/2007 05:52 AM, Mathew Snyder wrote:
>> I've attached the complete script.
>>
>> Mathew
> 
> Mathew,
> 
> I don't have time to investigate the whole script, but I wondered if
> you've looked at the perl debugger to step through the code. I always
> find the tool invaluable when I have a script that's not doing what I
> expect.
> 
> Steve
> 



More information about the rt-users mailing list