<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="content-type" content="text/html;
charset=ISO-8859-1">
</head>
<body text="#000000" bgcolor="#ffffff">
My users would like to have reports on their RT-at-a-Glance page
which would parse out their tickets from several queues into a
report grouped by the requestors initial of their last name. <br>
<br>
For example group 1 may be A-F, Group 2 G-K, etc.<br>
<br>
I was thinking of having a Custom Field associated with their queues
that was set at time of entry and then have the report use that
value in this field (A-Z) to select records<br>
<br>
My problem is that I do not know the field name for the Requestors
Real Name as indicated in the ?? marks below.<br>
<br>
Additionally, I am VERY open if someone has a better idea.<br>
<br>
Below is the script I was going to have exec at New Ticket entry<br>
<br>
Any help is greatly appreciated<br>
<br>
Thanks<br>
<br>
Joe<br>
<br>
<span class="Apple-style-span" style="border-collapse: separate;
color: rgb(0, 0, 0); font-family: 'Times New Roman'; font-style:
normal; font-variant: normal; font-weight: normal; letter-spacing:
normal; line-height: normal; orphans: 2; text-indent: 0px;
text-transform: none; white-space: normal; widows: 2;
word-spacing: 0px; font-size: medium;">
<div style="margin: 0px; background-color: transparent;"><span
id="internal-source-marker_0.6424971902742982"
style="font-size: 11pt; font-family: Arial; color: rgb(0, 0,
0); background-color: transparent; font-weight: normal;
font-style: normal; text-decoration: none; vertical-align:
baseline; white-space: pre-wrap;">my $CFName = 'Last Name<br>
<br>
Grouping';</span><br>
<span style="font-size: 11pt; font-family: Arial; color: rgb(0,
0, 0); background-color: transparent; font-weight: normal;
font-style: normal; text-decoration: none; vertical-align:
baseline; white-space: pre-wrap;">my $RecTransaction = 1;</span><br>
<span style="font-size: 11pt; font-family: Arial; color: rgb(0,
0, 0); background-color: transparent; font-weight: normal;
font-style: normal; text-decoration: none; vertical-align:
baseline; white-space: pre-wrap;"></span><br>
<span style="font-size: 11pt; font-family: Arial; color: rgb(0,
0, 0); background-color: transparent; font-weight: normal;
font-style: normal; text-decoration: none; vertical-align:
baseline; white-space: pre-wrap;"></span><br>
<span style="font-size: 11pt; font-family: Arial; color: rgb(0,
0, 0); background-color: transparent; font-weight: normal;
font-style: normal; text-decoration: none; vertical-align:
baseline; white-space: pre-wrap;"> my $QueueObj =<br>
<br>
$self->TicketObj->QueueObj;</span><br>
<span style="font-size: 11pt; font-family: Arial; color: rgb(0,
0, 0); background-color: transparent; font-weight: normal;
font-style: normal; text-decoration: none; vertical-align:
baseline; white-space: pre-wrap;"> my $CFObj =<br>
<br>
RT::CustomField->new( $QueueObj-><b>??Requestor.RealName??<br>
<br>
</b>);</span><br>
<span style="font-size: 11pt; font-family: Arial; color: rgb(0,
0, 0); background-color: transparent; font-weight: normal;
font-style: normal; text-decoration: none; vertical-align:
baseline; white-space: pre-wrap;"><br>
<br>
$CFObj->LoadByNameAndQueue( Name => $CFName, Queue<br>
<br>
=> $QueueObj->id );</span><br>
<span style="font-size: 11pt; font-family: Arial; color: rgb(0,
0, 0); background-color: transparent; font-weight: normal;
font-style: normal; text-decoration: none; vertical-align:
baseline; white-space: pre-wrap;"> unless( $CFObj->id ) {</span><br>
<span style="font-size: 11pt; font-family: Arial; color: rgb(0,
0, 0); background-color: transparent; font-weight: normal;
font-style: normal; text-decoration: none; vertical-align:
baseline; white-space: pre-wrap;"><br>
<br>
$RT::Logger->warning("custom field '$CFName' isn't<br>
<br>
defined for queue '". $QueueObj->Name ."'");</span><br>
<span style="font-size: 11pt; font-family: Arial; color: rgb(0,
0, 0); background-color: transparent; font-weight: normal;
font-style: normal; text-decoration: none; vertical-align:
baseline; white-space: pre-wrap;"> return undef;</span><br>
<span style="font-size: 11pt; font-family: Arial; color: rgb(0,
0, 0); background-color: transparent; font-weight: normal;
font-style: normal; text-decoration: none; vertical-align:
baseline; white-space: pre-wrap;"> }</span><br>
<span style="font-size: 11pt; font-family: Arial; color: rgb(0,
0, 0); background-color: transparent; font-weight: normal;
font-style: normal; text-decoration: none; vertical-align:
baseline; white-space: pre-wrap;"></span><br>
<span style="font-size: 11pt; font-family: Arial; color: rgb(0,
0, 0); background-color: transparent; font-weight: normal;
font-style: normal; text-decoration: none; vertical-align:
baseline; white-space: pre-wrap;"></span><br>
<span style="font-size: 11pt; font-family: Arial; color: rgb(0,
0, 0); background-color: transparent; font-weight: normal;
font-style: normal; text-decoration: none; vertical-align:
baseline; white-space: pre-wrap;"></span><br>
<span style="font-size: 11pt; font-family: Arial; color: rgb(0,
0, 0); background-color: transparent; font-weight: normal;
font-style: normal; text-decoration: none; vertical-align:
baseline; white-space: pre-wrap;"> my $RequestorRealName = '<b>??Requestor.RealName??</b>';</span><br>
<span style="font-size: 11pt; font-family: Arial; color: rgb(0,
0, 0); background-color: transparent; font-weight: normal;
font-style: normal; text-decoration: none; vertical-align:
baseline; white-space: pre-wrap;"> my $LastInitial =<br>
<br>
substr($RequestorRealName ,instr($RequestorRealName ,'<br>
<br>
',-1,1)+1,1);</span><br>
<span style="font-size: 11pt; font-family: Arial; color: rgb(0,
0, 0); background-color: transparent; font-weight: normal;
font-style: normal; text-decoration: none; vertical-align:
baseline; white-space: pre-wrap;"></span><br>
<span style="font-size: 11pt; font-family: Arial; color: rgb(0,
0, 0); background-color: transparent; font-weight: normal;
font-style: normal; text-decoration: none; vertical-align:
baseline; white-space: pre-wrap;"> unless(<br>
<br>
$self->TicketObj->FirstCustomFieldValue( $CFObj->id )<br>
<br>
) {</span><br>
<span style="font-size: 11pt; font-family: Arial; color: rgb(0,
0, 0); background-color: transparent; font-weight: normal;
font-style: normal; text-decoration: none; vertical-align:
baseline; white-space: pre-wrap;"> my( $st, $msg ) =<br>
<br>
$self->TicketObj->AddCustomFieldValue(</span><br>
<span style="font-size: 11pt; font-family: Arial; color: rgb(0,
0, 0); background-color: transparent; font-weight: normal;
font-style: normal; text-decoration: none; vertical-align:
baseline; white-space: pre-wrap;"><br>
<br>
Field =><br>
<br>
$CFObj->id,</span><br>
<span style="font-size: 11pt; font-family: Arial; color: rgb(0,
0, 0); background-color: transparent; font-weight: normal;
font-style: normal; text-decoration: none; vertical-align:
baseline; white-space: pre-wrap;"><br>
<br>
Value =><br>
<br>
$LastInitial,</span><br>
<span style="font-size: 11pt; font-family: Arial; color: rgb(0,
0, 0); background-color: transparent; font-weight: normal;
font-style: normal; text-decoration: none; vertical-align:
baseline; white-space: pre-wrap;"><br>
<br>
RecordTransaction<br>
<br>
=> $RecTransaction );</span><br>
<span style="font-size: 11pt; font-family: Arial; color: rgb(0,
0, 0); background-color: transparent; font-weight: normal;
font-style: normal; text-decoration: none; vertical-align:
baseline; white-space: pre-wrap;"> unless( $st ) {</span><br>
<span style="font-size: 11pt; font-family: Arial; color: rgb(0,
0, 0); background-color: transparent; font-weight: normal;
font-style: normal; text-decoration: none; vertical-align:
baseline; white-space: pre-wrap;"><br>
<br>
$RT::Logger->warning( "Couldn't set $DefaultValue as<br>
<br>
value for CF $CFName:". $msg );</span><br>
<span style="font-size: 11pt; font-family: Arial; color: rgb(0,
0, 0); background-color: transparent; font-weight: normal;
font-style: normal; text-decoration: none; vertical-align:
baseline; white-space: pre-wrap;"> return undef;</span><br>
<span style="font-size: 11pt; font-family: Arial; color: rgb(0,
0, 0); background-color: transparent; font-weight: normal;
font-style: normal; text-decoration: none; vertical-align:
baseline; white-space: pre-wrap;"> }</span><br>
<span style="font-size: 11pt; font-family: Arial; color: rgb(0,
0, 0); background-color: transparent; font-weight: normal;
font-style: normal; text-decoration: none; vertical-align:
baseline; white-space: pre-wrap;"> }</span><br>
<span style="font-size: 11pt; font-family: Arial; color: rgb(0,
0, 0); background-color: transparent; font-weight: normal;
font-style: normal; text-decoration: none; vertical-align:
baseline; white-space: pre-wrap;"></span><br>
<span style="font-size: 11pt; font-family: Arial; color: rgb(0,
0, 0); background-color: transparent; font-weight: normal;
font-style: normal; text-decoration: none; vertical-align:
baseline; white-space: pre-wrap;"> return 1;</span></div>
</span><br>
<pre class="moz-signature" cols="72">--
Joe Kirby , Assistant Vice President, Business Systems
Division of Information Technology (DoIT)
Support Response - <a moz-do-not-send="true" class="moz-txt-link-freetext" href="http://www.umbc.edu/oit">http://www.umbc.edu/oit</a>
Administration 627
Office - 410-455-3020
Email - <a moz-do-not-send="true" class="moz-txt-link-abbreviated" href="mailto:kirby@umbc.edu">kirby@umbc.edu</a></pre>
</body>
</html>