[rt-users] Modified BugList.html and Global Custom Fields
Steve Neruda
neruda at neruda.com
Wed Apr 9 23:17:20 EDT 2003
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 at uiowa.edu wrote:
>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
>
>
>
>
>
> ------------------------------------------------------------------------
>
>
> Current new and open tickets.
>
> <%PERL> my $tickets = new RT::Tickets($user);
> $tickets->LimitStatus(VALUE => 'open'); $tickets->LimitStatus(VALUE =>
> 'new'); $tickets->OrderBy(FIELD => 'id', ALIAS => 'main', ORDER =>
> 'ASC'); % if ($tickets->Count) { Subject Status Queue Room
> %while (my $ticket = $tickets->Next) { % $i++; % my $room =
> $ticket->CustomFieldValues($room_sel->id)->First; <%$ticket->Id%>
> <%$ticket->Subject%> <%$ticket->Status%> <%$ticket->QueueObj->Name%>
> Content%>
> % } % }
>
> <%INIT> my $user = new RT::CurrentUser('guest'); my $queue = new
> RT::Queue($user); my $i; my $room_sel= RT::CustomField->new($user);
> $room_sel->LoadByNameAndQueue(Name =>'Room', Queue => $queue->Id);
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.bestpractical.com/pipermail/rt-users/attachments/20030409/e2521891/attachment.htm>
More information about the rt-users
mailing list