<html>
<head>
<meta content="text/html; charset=windows-1252"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<div class="moz-cite-prefix">Le 26/09/2016 à 07:44, Thanos
Constantopoulos a écrit :<br>
</div>
<blockquote
cite="mid:6de19567652846e992404dfb0e1967d9@odysseyconsultants.com"
type="cite">
<meta http-equiv="Content-Type" content="text/html;
charset=windows-1252">
<title>Odyssey</title>
<meta name="Generator" content="Microsoft Word 15 (filtered
medium)">
<style><!--
/* Font Definitions */
@font-face
{font-family:"Cambria Math";
panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0in;
margin-bottom:.0001pt;
font-size:11.0pt;
font-family:"Calibri",sans-serif;}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:#0563C1;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{mso-style-priority:99;
color:#954F72;
text-decoration:underline;}
span.EmailStyle17
{mso-style-type:personal-compose;
font-family:"Calibri",sans-serif;
color:windowtext;}
.MsoChpDefault
{mso-style-type:export-only;
font-family:"Calibri",sans-serif;}
@page WordSection1
{size:8.5in 11.0in;
margin:1.0in 1.25in 1.0in 1.25in;}
div.WordSection1
{page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
<div class="WordSection1">
<p class="MsoNormal">Dear All<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Is there a way to prevent ticket merging
when the tickets are not in the same queue?<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
</blockquote>
<br>
<br>
you have to override the method RT::Ticket->MergeInto for this.<br>
<br>
Here is an (untested) sample code to put in
rt/local/lib/RT/Ticket_Local.pm:<br>
<br>
<br>
package RT::Ticket;<br>
<br>
use strict;<br>
no warnings qw(redefine);<br>
<br>
my $old_mergeinto = \&MergeInto;<br>
<br>
*MergeInto = sub {<br>
my $self = shift;<br>
my $ticket_id = shift;<br>
<br>
my $MergeInto = RT::Ticket->new($self->CurrentUser);<br>
$MergeInto->Load($ticket_id);<br>
<br>
if ( $MergeInto->Id ) {<br>
if ( $self->Queue != $MergeInto->Queue ) {<br>
return ( 0, $self->loc("Can't merge tickets from
different queues ([_1], [_2])", $self->QueueObj->Name,
$MergeInto->QueueObj->Name) );<br>
}<br>
}<br>
<br>
return $old_mergeinto->($self, @_);<br>
<br>
};<br>
<br>
1;<br>
<br>
<br>
<br>
if you only take care of the web interface, youb should be able to
block the merge processing using the callback located in
share/html/Ticket/ModifyLinks.html, by looking at posted args,
loading target ticket and checking queues against
$TicketObj->Queue. Then if queues does not match, push a message
in @$Results and delete the merge from $ARGSRef.<br>
</body>
</html>