Robin,<br><br>No, you can't get it with REST. That would be nice. They
DO have LinkedTo, but that is the opposite of what you want. They don't
have a LinkedFrom or a "TicketID" (RT uses the EffectiveID when do ing
searches for Tickets), which would be a nice feature. You will have to
write a separate SQL to do this.<br>
<br>Kenn<br>LBNL<br><br><div class="gmail_quote">On Wed, Apr 28, 2010 at 2:10 AM, Robin Williams <span dir="ltr"><<a href="mailto:r.williams@lancs.ac.uk">r.williams@lancs.ac.uk</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;">
Hi Kenneth,<br>
<br>
When you say the links table has that info - are you saying that a direct DB call is necessary, or can the links table info be got at via REST? When I tried I couldn't determine the necessary REST syntax. Sorry to thread hijack, but I'm trying to achieve something similar to Keith!<br>
<br>
Thanks,<br>
Robin.<br>
<br>
<br>
Kenneth Crocker 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 class="im">
Kieth,<br>
<br>
The LINKS Table will have that info. Type is "MergedInto".<br>
<br>
Kenn<br>
LBNL<br>
<br></div><div class="im">
On Tue, Apr 27, 2010 at 4:28 PM, Kenneth Crocker <<a href="mailto:kfcrocker@lbl.gov" target="_blank">kfcrocker@lbl.gov</a> <mailto:<a href="mailto:kfcrocker@lbl.gov" target="_blank">kfcrocker@lbl.gov</a>>> wrote:<br>
<br>
Kieth,<br>
<br>
The LINKS Table will have that info. Type is "MergedInto".<br>
<br>
Kenn<br>
LBNL<br>
<br>
<br>
On Tue, Apr 27, 2010 at 2:53 PM, Keith Edmunds<br></div><div><div></div><div class="h5">
<<a href="mailto:kae@midnighthax.com" target="_blank">kae@midnighthax.com</a> <mailto:<a href="mailto:kae@midnighthax.com" target="_blank">kae@midnighthax.com</a>>> wrote:<br>
<br>
Is it not possible to detect which ticket is being merged?<br>
<br>
> We have a scrip that runs "On Transaction" and calls an<br>
external script,<br>
> passing the ticket id. We want to take actions in the<br>
external script<br>
> when a ticket is merged. If we merge, say, ticket 100 into<br>
ticket 200,<br>
> the ticket id passed to our external script is 200. How can<br>
we find out,<br>
> via the REST interface, the ticket id that was merged (100<br>
in this<br>
> example)?<br>
><br>
> Frustratingly, going the other way is easy - if we retrieve<br>
ticket<br>
> information for 100 via the REST interface, ticket 200 is<br>
retrieved.<br>
><br>
> If it helps, here's our scrip (we are not Perl wizards,<br>
which may be<br>
> stating the obvious when you see the code below: all<br>
criticism gratefully<br>
> received):<br>
><br>
> my $tx = $self->TransactionObj;<br>
> my $ticket = $self->TicketObj;<br>
> my $id = $ticket->id;<br>
> my $type = $tx->Type;<br>
> my $field = $tx->Field;<br>
> my $old = $tx->OldValue;<br>
> my $new = $tx->NewValue;<br>
><br>
> system("wget<br>
><br>
'<a href="http://localhost/xyz/transaction?rt=$id" target="_blank">http://localhost/xyz/transaction?rt=$id</a>".'&type='."$type".'&field='."$field".'&old='."$old".'&new='."$new'")<br>
><br>
> Thanks<br>
<br>
</div></div></blockquote><div><div></div><div class="h5">
<br>
Discover RT's hidden secrets with RT Essentials from O'Reilly Media.<br>
Buy a copy at <a href="http://rtbook.bestpractical.com" target="_blank">http://rtbook.bestpractical.com</a><br>
</div></div></blockquote></div><br>