Modified BugList.html and Global Custom Fields

Hello all,

First of all I will admin that I am not very good with Perl. It’s something I
am trying to learn in my non-existent free time.

Tonight I saw Jesse’s Buglist.html. This was the one thing that was keeping my
boss from letting me move our security database to RT. So I started hacking
away. What I was trying to accomplish was to simply print out new and open
tickets from all the queues for our help desk to look at. I got most of this
working except for one problem. We have about 15 Global Custom fields that we
use in our tickets. But for the life of me I can’t get any of the values to
print out. I’m sure I’m just not calling something correctly. And I’m sure
it’s probably a 5 minute thing but I don’t have any idea.

I tried to use the serverity field as an example changing the values to my
global field but I don’t get anything when buglist displays.

I have attached my modified source to buglist.html. Can anyone tell me or show
me an example of out to get the values of custome field out.

thanks
Jason

buglist_local.html (1.37 KB)

Looking at my log files when I try to run it I see:

Apr 10 00:14:04 gamma RT: Couldn’t load from the users database.
(/opt/rt3/lib/RT/CurrentUser.pm:111)

And the relevant snippet of code from CurrentUser.pm:

sub UserObj {
my $self = shift;

unless ($self->{'UserObj'}) {
    use RT::User;
    $self->{'UserObj'} = RT::User->new($self);
    unless ($self->{'UserObj'}->Load($self->Id)) {
        $RT::Logger->err($self->loc("Couldn't load [_1] from the 

users database.\n", $self->Id));
}

}
return ($self->{'UserObj'});

}

}}}

That’s as far as I got debugging…hope this helps.

SteveN

jason-alexander@uiowa.edu wrote:

Umm, I’m not sure that is the problem. I have a guest user and they have
rights to read tickets. When I load up
the page I can see tickets. I can get any of the default fields just
fine. For instance I can get the ID, Status, Subject, with out
any problems. I just don’t seem to be able to access the custom
fields. I have even tried giving the guest user SuperUser access
to see if it was a permission problem but it doesn’t seem to make any
difference.

Jason

At 11:40 PM 4/9/2003 -0400, you wrote:

I just took another look at (so I wouldn’t wake up a 3 am thinking about
it). The problem appears to be taht you are setting $user to guest via
CurrentUser and the you do a

my $tickets = new RT::Tickets($user);

which just looks up the tickets for guest. If I set it to be my userID I
get a list of tickets.

-***************************************************

Jason Alexander
Senior Security Analyst
CIO Office, The University of Iowa
300-28 University Services Building
jason-alexander@uiowa.edu / 319-335-6174