<br><font size=2 face="sans-serif">Hi,</font>
<br>
<br><font size=2 face="sans-serif">Ruz : I can see something related to
a $LinkCallback, but the perl code is still too tricky for me. Maybe in
a few month ;)</font>
<br>
<br><font size=2 face="sans-serif">So, I managed to have a new ColumnMap
definition, working, with a great usefull color customization (see attached
image).</font>
<br>
<br><font size=2 face="sans-serif">I had it working adding manually the
'__LinksList__' in the Advanced tab of search page, <b>now i have to figure
out how to add it to the default choice list...</b></font>
<br><font size=2 face="sans-serif">a good training !</font>
<br>
<br><font size=2 face="sans-serif">Here is the revelant code added to /opt/rt3/share/html/Elements/RT__Ticket/ColumnMap
: </font>
<br>
<br><font size=2 face="sans-serif"> LinksList =></font>
<br><font size=2 face="sans-serif"> {</font>
<br><font size=2 face="sans-serif">        title  
  => 'Liens', # loc</font>
<br><font size=2 face="sans-serif">        attribute
=> 'Status',</font>
<br><font size=2 face="sans-serif">        value  
  => sub {</font>
<br><font size=2 face="sans-serif">           
    my $Ticket = shift;</font>
<br><font size=2 face="sans-serif">           
    my $result = "<UL>";</font>
<br><font size=2 face="sans-serif">           
    my $SearchURL;</font>
<br><font size=2 face="sans-serif">           
    my $statuscolor;</font>
<br>
<br><font size=2 face="sans-serif">           
    #tickets avec relation DependsOn</font>
<br><font size=2 face="sans-serif">           
    my $DepOn = $Ticket->DependsOn;</font>
<br><font size=2 face="sans-serif">           
    if ($DepOn) {</font>
<br><font size=2 face="sans-serif">           
            while( my $copain = $DepOn->Next
) {</font>
<br><font size=2 face="sans-serif">           
                    $SearchURL
= RT->Config->Get('WebPath') . '/Ticket/Display.html?id=' . $copain->TargetObj->id;</font>
<br><font size=2 face="sans-serif">           
            $result .= <UL>;</font>
<br><font size=2 face="sans-serif">           
                    if($copain->TargetObj->Status
=~ /^(?:new|open|stalled)$/ ) {</font>
<br><font size=2 face="sans-serif">           
                     
      $result .= "<FONT COLOR=\"red\"><LI><a
href=\"$SearchURL\">" . $copain->TargetObj->Subject
. "</a></LI></FONT>";}</font>
<br><font size=2 face="sans-serif">           
                    else
{</font>
<br><font size=2 face="sans-serif">           
                     
      $result .= "<SPAN CLASS=\"ticket-inactive\"><LI><a
href=\"$SearchURL\">" . $copain->TargetObj->Subject
. "</a></LI></SPAN>";}</font>
<br><font size=2 face="sans-serif">           
                     }</font>
<br><font size=2 face="sans-serif">           
    }</font>
<br><font size=2 face="sans-serif">           
    else {</font>
<br><font size=2 face="sans-serif">           
    $result .= 'Pas de tickets dependants';</font>
<br><font size=2 face="sans-serif">           
    }</font>
<br>
<br><font size=2 face="sans-serif">           
    $result .= "</UL>";</font>
<br><font size=2 face="sans-serif">           
    return \$result;</font>
<br><font size=2 face="sans-serif">          }</font>
<br><font size=2 face="sans-serif">},</font>
<br>
<br><font size=2 face="sans-serif">Result shown as :</font>
<br>
<br><font size=2 face="sans-serif"><br>
Raphaël MOUNEYRES<br>
Ingénieur Moyens Tests<br>
Avenue Paul Gellos 64990 Mouguerre<br>
Phone: +33 (0)5 59 58 41 51</font>
<br>
<br>
<br>
<table width=100%>
<tr valign=top>
<td width=40%><font size=1 face="sans-serif"><b>Ruslan Zakirov <ruz@bestpractical.com></b>
</font>
<br><font size=1 face="sans-serif">Envoyé par : ruslan.zakirov@gmail.com</font>
<p><font size=1 face="sans-serif">10/08/2011 13:06</font>
<td width=59%>
<table width=100%>
<tr valign=top>
<td>
<div align=right><font size=1 face="sans-serif">A</font></div>
<td><font size=1 face="sans-serif">Raphaël MOUNEYRES <raphael.mouneyres@sagemcom.com></font>
<tr valign=top>
<td>
<div align=right><font size=1 face="sans-serif">cc</font></div>
<td><font size=1 face="sans-serif">RT Users Mailing List <rt-users@lists.bestpractical.com></font>
<tr valign=top>
<td>
<div align=right><font size=1 face="sans-serif">Objet</font></div>
<td><font size=1 face="sans-serif">Re: [rt-users] adding Ticket links in
search result</font></table>
<br>
<table>
<tr valign=top>
<td>
<td></table>
<br></table>
<br>
<br>
<br><font size=3><br>
10.08.2011 12:58 пользователь "Raphaël MOUNEYRES"
<</font><a href=mailto:raphael.mouneyres@sagemcom.com><font size=3 color=blue><u>raphael.mouneyres@sagemcom.com</u></font></a><font size=3>>
написал:<br>
><br>
><br>
> Hello, <br>
><br>
> thanks for the hint, but it doesn't work as expected. <br>
> In fact, in the advanced page, the fileds used are : <br>
> '__DependsOn__', <br>
> '__Children__' <br>
> each of them is, by default, creating by itself a List of clickable
ticket IDs, and i'd like to add subject and formatting. <br>
><br>
> Also, in /share/html/Elements/RT__Ticket/ColumnMap, i can see that
the 'ExtendedStatus' is doing some query for dependedon tickets, so i can
try to do something similar, but i can't find the same things for 'Children'
or 'DependsOn' <br>
><br>
> If someone can point me at the sourcecode trigered by the above fields,
i could change it to suit my needs <br>
Code for links in the same file. It's just generated with a loop.</font>
<p><font size=3>> thank you, <br>
><br>
> Raphaël MOUNEYRES<br>
><br>
><br>
><br>
><br>
> Gerard FENELON <</font><a href="mailto:gerard@eve-team.com"><font size=3 color=blue><u>gerard@eve-team.com</u></font></a><font size=3>>
<br>
> Envoyé par : </font><a href="mailto:rt-users-bounces@lists.bestpractical.com"><font size=3 color=blue><u>rt-users-bounces@lists.bestpractical.com</u></font></a><font size=3><br>
><br>
> 09/08/2011 12:17<br>
> A<br>
> RT Users Mailing List <</font><a href="mailto:rt-users@lists.bestpractical.com"><font size=3 color=blue><u>rt-users@lists.bestpractical.com</u></font></a><font size=3>><br>
> cc<br>
> Objet<br>
> Re: [rt-users] adding Ticket links in search result<br>
><br>
><br>
><br>
><br>
><br>
> Hi Raphael<br>
><br>
> keep to the list.<br>
> In particular because I don't have the answer to this further question.<br>
><br>
> I have never tried anything like what you are trying.<br>
> It is possible that for this you might have to use a ColumnMap<br>
><br>
> However concerning "display the Ticket subject next to his number"<br>
> I believe that '__id__  __Subject__ ' should work.<br>
><br>
> Gerard<br>
><br>
><br>
> On 2011-08-09 11:28, Raphaël MOUNEYRES wrote: <br>
><br>
> Hi Gerard, <br>
><br>
> i've tried some but i'm not sure to be able to do conditional formatting
such as : <br>
>    % my $inactive = $member->QueueObj->IsInactiveStatus($member->Status);
<br>
>    <span class="<% $inactive ? 'ticket-inactive'
: '' %>"> <br>
>    <%$member->Id%>: (<%$member->OwnerObj->Name%>)
<%$member->Subject%> [<% loc($member->Status) %>] <br>
>    </span> <br>
><br>
> for example, if i do <br>
> '   <b><a href="__WebPath__/Ticket/Display.html?id=__id__">__id__</a></b>/TITLE:#',<br>
> '<span class="ticket-inactive">__Children__</span>'
<br>
> for sure all children tickets are displayed as ticket-inactive, but
not depending on their actual status... <br>
><br>
> Also i'd like to display the Ticket subject next to his number....
<br>
> Well i'm doing more experiments now, but any other hints are welcome.
<br>
><br>
> Raphaël MOUNEYRES<br>
><br>
><br>
> Gerard FENELON <</font><a href="mailto:gerard@eve-team.com"><font size=3 color=blue><u>gerard@eve-team.com</u></font></a><font size=3>>
<br>
> Envoyé par : </font><a href="mailto:rt-users-bounces@lists.bestpractical.com"><font size=3 color=blue><u>rt-users-bounces@lists.bestpractical.com</u></font></a><font size=3><br>
><br>
> 09/08/2011 11:08<br>
><br>
> A<br>
> </font><a href="mailto:rt-users@lists.bestpractical.com"><font size=3 color=blue><u>rt-users@lists.bestpractical.com</u></font></a><font size=3><br>
> cc<br>
> Objet<br>
> Re: [rt-users] adding Ticket links in search result<br>
><br>
><br>
><br>
><br>
><br>
> Hello<br>
><br>
> you can do a lot of things in the advanced tab of the search interface<br>
> such as<br>
><br>
> '<b><a href="/Ticket/Modify.html?id=__id__">__id__</a></b>/TITLE:#',<br>
> '<span class="yoyodine-status-__StatusNoLoc__">__ExtendedStatus__</span>',<br>
> '<span class="yoyodine-severity-__CustomField.{Severity}__">__CustomField.{Severity}__</span>',<br>
> '<span class="yoyodine-priority-__CustomField.{Customer priority}__">__CustomField.{Customer
priority}__</span>',<br>
><br>
> I would say, use this when you want to tweek the display.<br>
> Use ColumnMap when you have to calculate values<br>
><br>
> Gerard<br>
><br>
><br>
> On 2011-08-09 10:48, Raphaël MOUNEYRES wrote: <br>
> Hello, <br>
><br>
> i'm trying to build a search wich would have a colum displaying the
tickets links exactly the same way as is TicketDisplay page (with 3.8 install)
<br>
> I found two things : <br>
> - this code related to the above page is in /opt/rt3/share/html/Elements/ShowLinks
<br>
> - in ticket search engine, i can display children/DependsOn links,
but the result will only show ticket ids without formatting. <br>
><br>
> Should i create a new ColumnMap (as recently discussed) pasting some
code from the ShowLinks File, or any simpler way to modify the existing
colums ? <br>
> Could someone help me choose the best way to go ? <br>
><br>
> After a few month dealing with RT, i've been gaining some perl programming
experience, thanks guys ! <br>
><br>
> Raphaël MOUNEYRES <br>
><br>
> --------<br>
> 2011 Training: </font><a href=http://bestpractical.com/services/training.html><font size=3 color=blue><u>http://bestpractical.com/services/training.html</u></font></a><font size=3>
<br>
><br>
> #<br>
> " Ce courriel et les documents qui lui sont joints peuvent contenir
des<br>
> informations confidentielles ou ayant un caractère privé. S'ils ne
vous sont<br>
> pas destinés, nous vous signalons qu'il est strictement interdit de
les<br>
> divulguer, de les reproduire ou d'en utiliser de quelque manière que
ce<br>
> soit le contenu. Si ce message vous a été transmis par erreur, merci
d'en<br>
> informer l'expéditeur et de supprimer immédiatement de votre système<br>
> informatique ce courriel ainsi que tous les documents qui y sont attachés."<br>
><br>
><br>
>                               
******<br>
><br>
> " This e-mail and any attached documents may contain confidential
or<br>
> proprietary information. If you are not the intended recipient, you
are<br>
> notified that any dissemination, copying of this e-mail and any attachments<br>
> thereto or use of their contents by any means whatsoever is strictly<br>
> prohibited. If you have received this e-mail in error, please advise
the<br>
> sender immediately and delete this e-mail and all attached documents<br>
> from your computer system."<br>
> #<br>
><br>
><br>
> --------<br>
> RT Training Sessions (</font><a href=http://bestpractical.com/services/training.html><font size=3 color=blue><u>http://bestpractical.com/services/training.html</u></font></a><font size=3>)<br>
> *  Chicago, IL, USA — September 26 & 27, 2011<br>
> *  San Francisco, CA, USA — October 18 & 19, 2011<br>
> *  Washington DC, USA — October 31 & November 1, 2011<br>
> *  Melbourne VIC, Australia — November 28 & 29, 2011<br>
> *  Barcelona, Spain — November 28 & 29, 2011</font>
<p><PRE>#
" Ce courriel et les documents qui lui sont joints peuvent contenir des
informations confidentielles ou ayant un caractre priv. S'ils ne vous sont
pas destins, nous vous signalons qu'il est strictement interdit de les
divulguer, de les reproduire ou d'en utiliser de quelque manire que ce
soit le contenu. Si ce message vous a t transmis par erreur, merci d'en
informer l'expditeur et de supprimer immdiatement de votre systme
informatique ce courriel ainsi que tous les documents qui y sont attachs."


                               ******

" This e-mail and any attached documents may contain confidential or
proprietary information. If you are not the intended recipient, you are
notified that any dissemination, copying of this e-mail and any attachments
thereto or use of their contents by any means whatsoever is strictly
prohibited. If you have received this e-mail in error, please advise the
sender immediately and delete this e-mail and all attached documents
from your computer system."
#
</PRE>