On Create Merge Scrip

Hello,
I hoping someone can help me understand why a scrip I’m trying to create is
not working correctly.

Description: MergeBasedOnContent
Condition: On Create
Action: User Defined
Template: Global template: Blank
Stage: TransactionCreate

Custom condition:
Custom action preparation code:

my $AttachObj = $self->TransactionObj->Attachments->First;
my $content = $AttachObj->Content;
if ( $content =~ s/^\Qmerge:\E\s*(\S+)\s*$//im ) {
$self->TicketObj->MergeInto( $1 );
}

Custom action cleanup code:

The goal here is to search any new tickets for a string ‘merge:’ followed by
a number, and then merge the new ticket into that number. This works fine
for condition: On Correspond, but I am unable to get it to work on create.
It seems like its not finding the attachment.
Any ideas?
Thanks

HI,
i’m searching for a simple way for our Operating to simply move tickets from Operating Queue to several 2nd level queues. The way via basics->Change queue is not loved from the guys. On idea was to handle this from inside a tickets->tabs->Action menu, something like this:

$actions->{‘FF’} = {
path => “Ticket/Display.html?Action=Take&Queue = XYZ &id=” . $id,
title => loc(’ Move To Queue xyz ') };

Is this possible from this menu or a bad idea to do this?!?

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

OK, some times i’m too lazy to check it out, but it is much better to do this. yes it is working.

                                $actions->{'BBB-Clone1'} = {
                                            title => loc('[Move Ticket To Queue]'),
                                            path => "Ticket/Display.html?Action=Take&Queue=25&id=" . $id,
                                    };

Resolved :slight_smile:

TorstenVon: rt-devel-bounces@lists.bestpractical.com [mailto:rt-devel-bounces@lists.bestpractical.com] Im Auftrag von Brumm,Torsten / Kuehne + Nagel / Ham MI-ID
Gesendet: Donnerstag, 12. November 2009 12:06
An: rt-devel@lists.bestpractical.com
Betreff: [Rt-devel] Question for Ticket Actions (in Ticket/Elements/Tabs)

HI,
i’m searching for a simple way for our Operating to simply move tickets from Operating Queue to several 2nd level queues. The way via basics->Change queue is not loved from the guys. On idea was to handle this from inside a tickets->tabs->Action menu, something like this:

$actions->{‘FF’} = {
path => “Ticket/Display.html?Action=Take&Queue = XYZ &id=” . $id,
title => loc(’ Move To Queue xyz ') };

Is this possible from this menu or a bad idea to do this?!?

Thanks

Torsten

Kühne + Nagel (AG & Co.) KG, Geschäftsleitung: 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, Persönlich haftende Gesellschaft: Kühne & Nagel A.G., Sitz: Contern/Luxemburg, Geschäftsführender Verwaltungsrat: Klaus-Michael Kühne