[rt-users] How to get TicketObj from a Ticket ID
Brumm, Torsten / Kuehne + Nagel / Ham MI-ID
torsten.brumm at Kuehne-Nagel.com
Tue Nov 17 10:12:14 EST 2009
Hi Matt & Jason,
thanks for your support, but i cant get this running. I have tried both methods and both wont work.
Here my Action Code:
my $DepOnBy = $self->TicketObj->DependedOnBy;
while( my $dep = $DepOnBy->Next ) {
next unless( $dep->BaseURI->IsLocal );
my $orig = $dep->BaseObj->Id;
my $depon = $dep->TargetObj->Id;
$RT::Logger->debug("ORIG: $orig DEPON: $depon");
}
my $OriginalTicketObj = RT::Ticket->new($RT::SystemUser);
$OriginalTicketObj->Load($orig);
$RT::Logger->debug("TBRUMM-LWIS-TST: CustomActionCleanCode - Ende");
return 1;
---
This is the version like explained from Jason and it is not working.
And the same problem if i replace:
my $OriginalTicketObj = RT::Ticket->new($RT::SystemUser);
$OriginalTicketObj->Load($orig);
with
my $OriginalTicketObj = LoadTicket($orig);
I have now idea anymore whats going wrong at the moment.
Thanks
Torsten
Kuehne + Nagel (AG & Co.) KG, Geschaeftsleitung: Hans-Georg Brinkmann (Vors.), Dirk Blesius (Stellv.), Reiner Heiken (Stellv.), Bruno Mang, Alfred Manke, Christian Marnetté (Stellv.), Mark Reinhardt (Stellv.), Jens Wollesen, Rainer Wunn, Sitz: Bremen, Registergericht: Bremen, HRA 21928, USt-IdNr.: DE 812773878, Persoenlich haftende Gesellschaft: Kuehne & Nagel A.G., Sitz: Contern/Luxemburg Geschaeftsfuehrender Verwaltungsrat: Klaus-Michael Kuehne
-----Urspruengliche Nachricht-----
Von: rt-users-bounces at lists.bestpractical.com [mailto:rt-users-bounces at lists.bestpractical.com] Im Auftrag von Matt Zagrabelny
Gesendet: Dienstag, 17. November 2009 15:38
An: rt-users at lists.bestpractical.com
Betreff: Re: [rt-users] How to get TicketObj from a Ticket ID
On Tue, 2009-11-17 at 15:33 +0100, Brumm, Torsten / Kuehne + Nagel / Ham MI-ID wrote:
> Hi,
> i'm now searching since some hours how to get the TicketObj from a given Ticket ID.
>
> Normally from within a scrip i go this way: $self->TicketObj and i can
> work with all the Information (like $self->TicketObj->Status etc)
>
> Now i have only i Ticket ID stored in a variable and i'm searching a way to get back my TicketObj.
my $TicketObj = LoadTicket($id);
--
Matt Zagrabelny - mzagrabe at d.umn.edu - (218) 726 8844 University of Minnesota Duluth Information Technology Systems & Services PGP key 1024D/84E22DA2 2005-11-07
Fingerprint: 78F9 18B3 EF58 56F5 FC85 C5CA 53E7 887F 84E2 2DA2
He is not a fool who gives up what he cannot keep to gain what he cannot lose.
-Jim Elliot
_______________________________________________
http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users
Community help: http://wiki.bestpractical.com Commercial support: sales at bestpractical.com
Discover RT's hidden secrets with RT Essentials from O'Reilly Media.
Buy a copy at http://rtbook.bestpractical.com
More information about the rt-users
mailing list