Monday, January 31, 2011

RT Change Queue when Ticket Reaches Final Priority

Where I work, we use RT for our ticketing system.  Previously we had only about 12 or so queues that ran a priority from 1 to 100.  More recently we changed to a tiered or leveled approach.  That is each queue, now has three tiers such as Antivirus L1, L2, L3 or Networking L1, L2, L3.  However, I needed each ticket in a given queue to automatically move from L1 to L2 or L2 to L3 when the final priority for that level was reached.  I should not I am using rt-crontool to adjust the tickets priority, such as the following example illustrates:
/usr/local/bin/rt-crontool --verbose --search RT::Search::FromSQL --search-arg "Queue = 'Antivirus L1' AND (Status = 'new')" --action RT::Action::EscalatePriority --transaction last
So for each L1 and L2 Queue I have I made a scrip with the following conditions:

You will want to change the name-of-queue to whatever your queue is called.

Custom Action Preparation Code:
my $status = $self->;TicketObj->;Status;
my $final = $self->;TicketObj->;FinalPriority;
my $priority = $self->;TicketObj->;Priority;
return 0 unless $self->;TransactionObj->;Field eq 'Priority';
return 0 unless $status eq 'open' || $status eq 'new' || $status eq 'stalled';
return 0 unless $final >; 0;
return 0 unless $final == $priority;
return 1;

Custom Action Cleanup code:
my $newqueue = "#";
my $final = $self->;TicketObj->;FinalPriority;
my $priority = $self->;TicketObj->;Priority;
my $T_Obj = $self->;TicketObj;

$RT::Logger->;info("Auto assign ticket #". $T_Obj->;id ." to queue #". $newqueue );
my ($status, $msg) = $T_Obj->;SetQueue($newqueue);
unless ($status) {
$RT::Logger->;warning("unable to set new queue: $msg");
return undef;
$RT::Logger->;info("Change Ticket Priority ". $T_Obj->;id ." to ". "#" );
my ($status, $msg) = $T_Obj->;SetPriority("#");
unless ($status) {
$RT::Logger->;warning("unable to set new priority: $msg");
return undef;
$RT::Logger->;info("Change Final Priority ". $T_Obj->;id ." to ". "#" );
my ($status, $msg) = $T_Obj->;SetFinalPriority("#");
unless ($status) {
$RT::Logger->;warning("unable to set new final priority: $msg");
return undef;
return 1;

You will of course want to replace the Queue # and Priority # with the actual number of the new queue and new base and final priority settings.

This can be very tedious to setup for each and every queue, but it seems to work for me and I am sure it can work for you too!

Tuesday, January 18, 2011

It's a girl!

Great News.  We found out today, its a girl!  I couldn't be more happy or excited.  I am looking forward to it.  I think we've more or less decided on a name, however anything could happen, so we'll see.  It is going to be another few months before the baby gets here, so now comes the fun stuff.  We're going to start working on our registry and getting the room ready, eventually.  The room we were going to make the baby's is currently blue, but I don't know if we'll want to paint it.  I am not sure what all we need on our registry, but my wife seems to be making good time and has some stuff filled in already.

331 pounds

So, the scale and I are at war.  It says I weigh 331 pounds, I say its a stupid piece of crap.  Unfortunately, no matter how much I threaten to remove the nine volt battery it refuses to behave.  Maybe I have to come to the realization that the scale is right and I just need to lose it.  Weight, that is.  For some reason I find that even though I know I am fat, or according to the CDC body mass index morbidly obese, I feel that I don't seem to care.  I am apathetic to my cause, even though I know it is dire.  I need to, in my opinion, drop down, first to 300, then 275, 250 and so on.  I just don't know where or how to begin.  Obviously I need to adjust my diet and start exercising.  I suppose I will try spark people again.  I think they're the way to start, because they'll allow me to track calories.  Of course, I need to start doing something, essentially my day starts with waking up, going to work, sitting at work for 8 hours, driving home, sitting at home either watching tv to on the computer, eating dinner, watching more tv and sleep.  Of course, that is a rough idea of my average weekday, but as sad as it sounds it is pretty true.  I think I need to start slow, just walking outside.  I like my neighborhood because I have noticed the circle around my street is roughly a mile, so including the distance to and from my house it would be a mile.  So I am going to start there.  We'll see how it goes as diets and I don't get along.

8.6 Years

So I did the math today and realized I still have 8.6 years left on my student loans.  Does any one else wonder why you go to school for 4 years (give or take) and pay it back over 10 years (give or take).  Of course I find it intesting, at least based on my own math at the current pay schedule, my private loans will take 8.6 years and my stafford loans will only take 7.6 years.  Somehow, there is a whole year difference. Oh well, I don't mind, really.  I think I will see what I can do to possibly pay these off ahead of schedule, although they currently hit my wallet, rather hard so I may have to hold off until some other stuff gets paid off.

Monday, January 17, 2011

Coupons, Gas and More

I have started cutting coupons.  I don't know if I will use any of them, but somehow cutting them has seemed a worthwhile endeavor.  It seems that the price of everything has increased at a rate that my Debit card doesn't want to keep up with, especially the price of gas, unfortunately no coupons there.  If things don't start going the other way soon, I may have to re-think my route to work and possibly the car I am driving.  I am sensing that $3 a gallon gas may become the normal here in the short term and beyond.  I mean where I live it hasn't yet, but I certainly do see it on the horizon.  Money is one of this issues I don't really like discussing, but it always come up.  Just recently I have refinanced my auto loan to save money, in the now.  I am just not sure how much it will help in the long run, but ultimately, its about having more in the bank each month that really matters.  Now if I could just figure out some way to get rid of my student  loans without waiting 10 years or more.  Student loans are terrible, it seems you'll never get rid of them.  I am currently searching out electricity rates as my contract expires this next month, hopefully I can save some money there.  However water and gas are only provided by one company so no luck there at all.  Additionally, the Cable company raised their rates recently, so I am contemplating dropping several of my services and maybe just keeping Internet with Hulu Plus and Netflix, as this actually comes out to save me money.  Of course, who knows what I will actually do.  Then of course, there is a baby on the way, and honestly, I haven't budgeted for that at all.  I don't know how much anything is going to cost.  I am going to need to sit down and figure this out.  My goal and hope was to allow my wonderful wife to stay at home full time with the baby, however, right now I just don't think I can afford it.  I may need to take on a second job or find some other means of income.  No matter what, I think we'll be alright.  I suppose nothing can go as you plan it.  I just wish the future were more clear.

Tuesday, January 11, 2011


It seems the Consolidated just sucks. They provide this Copper Ethernet solution, which is essentially a bunch of coupled together DSL lines.  Anyway, three of our districts have this service and for one reason or another they keep going down, or rather crawl at abysmal rates.  Anyway, I do hope they fix themselves.

It's a ....

So, yesterday, we went to get a sonogram, but alas, the technician wasn't there.  So we wait one week and then we find out.