Joe,<br><br>I'm curious why you want a report in a User's home page that would show tickets <i>requested by other users</i> because their last name uses the same letter (ie. CF with A - G). Why not just have a report that shows all non-resolved tickets for which they are the Requestor? That would certainly be easier to write and set up.<br>
<br>Just a thought.<br><br>Kenn<br>LBNL<br><br><div class="gmail_quote">On Wed, Feb 9, 2011 at 11:08 AM, Joe Kirby (gmail) <span dir="ltr"><<a href="mailto:kirby@umbc.edu">kirby@umbc.edu</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<div 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 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; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; font-size: medium;">
<div style="margin: 0px; background-color: transparent;"><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 $CFName = 'Last Name
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 =
$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 =
RT::CustomField->new( $QueueObj-><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;">
$CFObj->LoadByNameAndQueue( Name => $CFName, Queue
=> $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;">
$RT::Logger->warning("custom field '$CFName' isn't
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 =
substr($RequestorRealName ,instr($RequestorRealName ,'
',-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(
$self->TicketObj->FirstCustomFieldValue( $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;"> my( $st, $msg ) =
$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;">
Field =>
$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;">
Value =>
$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;">
RecordTransaction
=> $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;">
$RT::Logger->warning( "Couldn't set $DefaultValue as
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><font color="#888888">
<pre cols="72">--
Joe Kirby , Assistant Vice President, Business Systems
Division of Information Technology (DoIT)
Support Response - <a href="http://www.umbc.edu/oit" target="_blank">http://www.umbc.edu/oit</a>
Administration 627
Office - 410-455-3020
Email - <a href="mailto:kirby@umbc.edu" target="_blank">kirby@umbc.edu</a></pre>
</font></div>
</blockquote></div><br>