<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
<title></title>
</head>
<body bgcolor="#ffffff" text="#000000">
Mike,<br>
<br>
I understand your frustration. I'm not familiar with that scrip, nor do
I usually write scrips that go against the USER Table. However, I was
thinking about how I would do it and I would want to try something that
captures the Requesors phone number at the time the ticket is created
and stuff it into a Custom Field. That way whenever the ticket is
looked at, the phone number could be displayed. An alternative of that
would be to modify the ticket display code (make a local copy of
/share/html/Ticket/Display.html) to display the Requestors phone when
accessed. That way you would always get the current Requestor (in case
it was changed after creation). I'm not sure, but if there is a
$Self->TransactionObj and a $Self->TicketObj then perhaps there
is also a $Self->UserObj that would allow you to get to the Users
phone.<br>
Perhaps there is someone out there that can pass on any of that kind of
knowledge.<br>
<br>
Kenn<br>
LBNL<br>
<br>
<br>
On 8/5/2009 10:31 PM, Michael Ellis wrote:
<blockquote cite="mid:C83D8A65DBCC4863AE0CFC7E887EF2D9@mikesMBP"
type="cite">
<meta content="text/html;charset=iso-8859-1" http-equiv="Content-Type">
<meta name="GENERATOR" content="MSHTML 8.00.7100.4129">
<div><font face="Calibri">One of the biggest complaints from my
privileged users during our testing of RT is that the requestor's phone
number is not presented to them conveniently. We currently handle the
bulk of our support by phone, so some of them are standing at my office
door with torches and pitchforks.</font></div>
<div> </div>
<div><font face="Calibri">To rectify this I am trying to implement
the custom scrip found on page 81 of the RT Essentials book, and
customize it to pull up phone numbers instead of departments.</font></div>
<div> </div>
<div><font face="Calibri">The customized scrip is:</font></div>
<div> </div>
<div><font face="Calibri">1 my $email =
($self->TicketObj->RequestorAddresses)[0];<br>
2 </font></div>
<div><font face="Calibri">3 my $ldap = Net::LDAP->new(
'someserver.umanitoba.ca' );<br>
4 $ldap->bind;<br>
5 <br>
6 my $msg = $ldap->search( base => 'o="University of
Manitoba,c="ca"',<br>
7 filter => "(mail=$email)",<br>
8 );<br>
9 <br>
10 my $entry = $msg->entry(0);<br>
11 <br>
12 my $phone= $entry->get_value('telephoneNumber');<br>
13 <br>
14 my $cf = RT::CustomField->new( $RT::SystemUser );<br>
15 $cf->LoadByName( Name => 'RequestorPhone' );<br>
16 <br>
17 $self->TicketObj->AddCustomFieldValue( Field => $cf,
Value => $phone);<br>
18 <br>
19 return 1;</font></div>
<div> </div>
<div><font face="Calibri">Changes from the original are</font></div>
<div><font face="Calibri">3 Server</font></div>
<div><font face="Calibri">6 Base</font></div>
<div><font face="Calibri">7 email -> mail (what our non-standard
ldap calls it)</font></div>
<div><font face="Calibri">12 $dept -> $phone</font></div>
<div><font face="Calibri">15 my custom field</font></div>
<div><font face="Calibri">17 $dept -> $phone</font></div>
<div> </div>
<div><font face="Calibri">The custom field RequestorPhone is not
being set, though. RT's debug log shows the entry:</font></div>
<div> </div>
<div><font face="Calibri">[error]: Scrip 16 Prepare failed: Can't
call method "get_value" on an undefined value at (eval 8643) line 12.</font></div>
<div> </div>
<div><font face="Calibri">Could someone help me get this working, or
share what they have done?</font></div>
<div> </div>
<div><font face="Calibri">Secondly, I am having an issue that when my
privileged users click on a requestor in the people tab of a ticket,
they are presented with:</font></div>
<div> </div>
<div><font face="Calibri">"Time to display: 0.009515</font></div>
<div> </div>
<div><font face="Calibri">»|« RT 3.8.4 Copyright 1996-2009 Best
Practical Solutions, LLC."</font></div>
<div> </div>
<div><font face="Calibri">Root/Superuser is taken to the requestor's
details.</font></div>
<div> </div>
<div><font face="Calibri">So right now, my people have no way to
obtain the requestor's phone number from within RT. So what are they
doing is falling back to our old helpdesk system and in frustration
entering the calls there. This is jeopardizing the acceptance and
adoption of RT as a replacement for our old system.</font></div>
<div> </div>
<div><font face="Calibri">I'm sure that I've made one or two (or
more) simple errors and wish I could spend more time looking into this
before going to the forum, but the townspeople are at the castle gates.</font></div>
<div> </div>
<div><font face="Calibri">TIA,</font></div>
<div> </div>
<div><font face="Calibri">Mike</font></div>
<pre wrap="">
<hr size="4" width="90%">
_______________________________________________
<a class="moz-txt-link-freetext" href="http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users">http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users</a>
Community help: <a class="moz-txt-link-freetext" href="http://wiki.bestpractical.com">http://wiki.bestpractical.com</a>
Commercial support: <a class="moz-txt-link-abbreviated" href="mailto:sales@bestpractical.com">sales@bestpractical.com</a>
Discover RT's hidden secrets with RT Essentials from O'Reilly Media.
Buy a copy at <a class="moz-txt-link-freetext" href="http://rtbook.bestpractical.com">http://rtbook.bestpractical.com</a></pre>
</blockquote>
</body>
</html>