Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Request Tracker: Users

Auto-creating a 'dependant' ticket On Transaction

 

 

Request Tracker users RSS feed   Index | Next | Previous | View Threaded


jrummel at imapp

Nov 24, 2009, 3:19 PM

Post #1 of 9 (825 views)
Permalink
Auto-creating a 'dependant' ticket On Transaction

Hi All,

I'm definitely an RT novice, and could use some assistance. I have a ticket
Custom Field ("Progress"). It is a Select One Value field. When someone
selects the value "Sent", I want a new ticket created that is 'depended on
by' the original ticket. Can anyone help me with this please? I'm
desperate!

Thanks!

P.S. If the new ticket could automatically have an owner assigned upon
creation as well, that would be ideal. But the above request is definitely
priority.
--
View this message in context: http://old.nabble.com/Auto-creating-a-%27dependant%27-ticket-On-Transaction-tp26505061p26505061.html
Sent from the Request Tracker - User mailing list archive at Nabble.com.

_______________________________________________
http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users

Community help: http://wiki.bestpractical.com
Commercial support: sales [at] bestpractical


Discover RT's hidden secrets with RT Essentials from O'Reilly Media.
Buy a copy at http://rtbook.bestpractical.com


torsten.brumm at googlemail

Nov 25, 2009, 3:23 AM

Post #2 of 9 (769 views)
Permalink
Re: Auto-creating a 'dependant' ticket On Transaction [In reply to]

Hi,
try the following from wiki (with tiny code changes)

Condition: Userdefined (
http://wiki.bestpractical.com/view/OnCustomFieldValueChange)
Action: CreateTickets
Template: CreateNewTicket (follow the Approval Ticket creation Template Page
from wiki, replace type: approval with type: ticket)

This should work fine

2009/11/25 jrummel <jrummel [at] imapp>

>
> Hi All,
>
> I'm definitely an RT novice, and could use some assistance. I have a
> ticket
> Custom Field ("Progress"). It is a Select One Value field. When someone
> selects the value "Sent", I want a new ticket created that is 'depended on
> by' the original ticket. Can anyone help me with this please? I'm
> desperate!
>
> Thanks!
>
> P.S. If the new ticket could automatically have an owner assigned upon
> creation as well, that would be ideal. But the above request is definitely
> priority.
> --
> View this message in context:
> http://old.nabble.com/Auto-creating-a-%27dependant%27-ticket-On-Transaction-tp26505061p26505061.html
> Sent from the Request Tracker - User mailing list archive at Nabble.com.
>
> _______________________________________________
> http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users
>
> Community help: http://wiki.bestpractical.com
> Commercial support: sales [at] bestpractical
>
>
> Discover RT's hidden secrets with RT Essentials from O'Reilly Media.
> Buy a copy at http://rtbook.bestpractical.com
>



--
MFG

Torsten Brumm

http://www.brumm.me
http://www.elektrofeld.de


Gabriele.Franzini at nervianoms

Nov 25, 2009, 3:24 AM

Post #3 of 9 (786 views)
Permalink
Re: Auto-creating a 'dependant' ticket On Transaction [In reply to]

Hello jrummel,
From novice to novice, try a Scrip with something like:

1) Condition: as in OnCustomFieldValueChange (see wiki);
2) Action: User-defined, based upon DivideTicketIntoSubtasks (see
wiki):

my $trans = $self->TransactionObj;
my $tkt = $self->TicketObj;

my $requestors = [ $tkt->Requestors->MemberEmailAddresses];
my $new_tkt = RT::Ticket->new($RT::SystemUser);
my ($id, $msg) = $new_tkt->Create(
Queue => "your-queue-name-goes-here",
Subject => $tkt->Subject,
Status => 'new',
Requestor => $requestors,
DependedOnBy => $tkt->Id)

return 1;

HTH,
Gabriele Franzini
ICT Applications Manager
Nerviano Medical Sciences SRL
PO Box 11 - Viale Pasteur 10
20014 Nerviano Italy
tel +39 0331581477
fax +39 0331581456

>
>Date: Tue, 24 Nov 2009 15:19:41 -0800 (PST)
>From: jrummel <jrummel [at] imapp>
>Subject: [rt-users] Auto-creating a 'dependant' ticket On Transaction
>To: rt-users [at] lists
>Message-ID: <26505061.post [at] talk>
>Content-Type: text/plain; charset=us-ascii
>
>Hi All,
>
>I'm definitely an RT novice, and could use some assistance. I have a
ticket
>Custom Field ("Progress"). It is a Select One Value field. When
someone
>selects the value "Sent", I want a new ticket created that is 'depended
on
>by' the original ticket. Can anyone help me with this please? I'm
desperate!
>
>Thanks!
>
>P.S. If the new ticket could automatically have an owner assigned upon
creation
> as well, that would be ideal. But the above request is definitely
priority.
_______________________________________________
http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users

Community help: http://wiki.bestpractical.com
Commercial support: sales [at] bestpractical


Discover RT's hidden secrets with RT Essentials from O'Reilly Media.
Buy a copy at http://rtbook.bestpractical.com


torsten.brumm at Kuehne-Nagel

Nov 25, 2009, 4:11 AM

Post #4 of 9 (779 views)
Permalink
Re: Auto-creating a 'dependant' ticket On Transaction [In reply to]

Hi,
carefull with this. This condition will trigger whenever a customfield values changes, and i thing you need this only when a special CF is changed to a special value!

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 [mailto:rt-users-bounces [at] lists] Im Auftrag von Franzini, Gabriele [Nervianoms]
Gesendet: Mittwoch, 25. November 2009 12:25
An: jrummel [at] imapp
Cc: rt-users [at] lists
Betreff: Re: [rt-users] Auto-creating a 'dependant' ticket On Transaction

Hello jrummel,
From novice to novice, try a Scrip with something like:

1) Condition: as in OnCustomFieldValueChange (see wiki);
2) Action: User-defined, based upon DivideTicketIntoSubtasks (see
wiki):

my $trans = $self->TransactionObj;
my $tkt = $self->TicketObj;

my $requestors = [ $tkt->Requestors->MemberEmailAddresses];
my $new_tkt = RT::Ticket->new($RT::SystemUser); my ($id, $msg) = $new_tkt->Create(
Queue => "your-queue-name-goes-here",
Subject => $tkt->Subject,
Status => 'new',
Requestor => $requestors,
DependedOnBy => $tkt->Id)

return 1;

HTH,
Gabriele Franzini
ICT Applications Manager
Nerviano Medical Sciences SRL
PO Box 11 - Viale Pasteur 10
20014 Nerviano Italy
tel +39 0331581477
fax +39 0331581456

>
>Date: Tue, 24 Nov 2009 15:19:41 -0800 (PST)
>From: jrummel <jrummel [at] imapp>
>Subject: [rt-users] Auto-creating a 'dependant' ticket On Transaction
>To: rt-users [at] lists
>Message-ID: <26505061.post [at] talk>
>Content-Type: text/plain; charset=us-ascii
>
>Hi All,
>
>I'm definitely an RT novice, and could use some assistance. I have a
ticket
>Custom Field ("Progress"). It is a Select One Value field. When
someone
>selects the value "Sent", I want a new ticket created that is 'depended
on
>by' the original ticket. Can anyone help me with this please? I'm
desperate!
>
>Thanks!
>
>P.S. If the new ticket could automatically have an owner assigned upon
creation
> as well, that would be ideal. But the above request is definitely
priority.
_______________________________________________
http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users

Community help: http://wiki.bestpractical.com Commercial support: sales [at] bestpractical


Discover RT's hidden secrets with RT Essentials from O'Reilly Media.
Buy a copy at http://rtbook.bestpractical.com

_______________________________________________
http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users

Community help: http://wiki.bestpractical.com
Commercial support: sales [at] bestpractical


Discover RT's hidden secrets with RT Essentials from O'Reilly Media.
Buy a copy at http://rtbook.bestpractical.com


torsten.brumm at Kuehne-Nagel

Nov 25, 2009, 4:16 AM

Post #5 of 9 (774 views)
Permalink
Re: Auto-creating a 'dependant' ticket On Transaction [In reply to]

Sorry, didn't read all,

1. Condition: CustomCondition:

if ( ($self->TransactionObj->Type eq "CustomField" ||
$self->TransactionObj->Type eq "Create" ) &&
($self->TicketObj->FirstCustomFieldValue('YourCustomFieldName') ||
$self->TicketObj->FirstCustomFieldValue('YourCustomFieldName')) ) {
return 1;
}
return 0;

Action: Userdefine:

Here the part of Gabriele but with the content check:

return(0) unless ($self->TicketObj->Type eq 'ticket');
if ($self->TicketObj->FirstCustomFieldValue('YourCustomFieldName') =~ /Whatyouarelookingfor/i) {

my $trans = $self->TransactionObj;
my $tkt = $self->TicketObj;

my $requestors = [ $tkt->Requestors->MemberEmailAddresses];
my $new_tkt = RT::Ticket->new($RT::SystemUser); my ($id, $msg) = $new_tkt->Create(
Queue => "your-queue-name-goes-here",
Subject => $tkt->Subject,
Status => 'new',
Requestor => $requestors,
DependedOnBy => $tkt->Id)

return 1;
}
return 0;


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 [mailto:rt-users-bounces [at] lists] Im Auftrag von Franzini, Gabriele [Nervianoms]
Gesendet: Mittwoch, 25. November 2009 12:25
An: jrummel [at] imapp
Cc: rt-users [at] lists
Betreff: Re: [rt-users] Auto-creating a 'dependant' ticket On Transaction

Hello jrummel,
From novice to novice, try a Scrip with something like:

1) Condition: as in OnCustomFieldValueChange (see wiki);
2) Action: User-defined, based upon DivideTicketIntoSubtasks (see
wiki):

my $trans = $self->TransactionObj;
my $tkt = $self->TicketObj;

my $requestors = [ $tkt->Requestors->MemberEmailAddresses];
my $new_tkt = RT::Ticket->new($RT::SystemUser); my ($id, $msg) = $new_tkt->Create(
Queue => "your-queue-name-goes-here",
Subject => $tkt->Subject,
Status => 'new',
Requestor => $requestors,
DependedOnBy => $tkt->Id)

return 1;

HTH,
Gabriele Franzini
ICT Applications Manager
Nerviano Medical Sciences SRL
PO Box 11 - Viale Pasteur 10
20014 Nerviano Italy
tel +39 0331581477
fax +39 0331581456

>
>Date: Tue, 24 Nov 2009 15:19:41 -0800 (PST)
>From: jrummel <jrummel [at] imapp>
>Subject: [rt-users] Auto-creating a 'dependant' ticket On Transaction
>To: rt-users [at] lists
>Message-ID: <26505061.post [at] talk>
>Content-Type: text/plain; charset=us-ascii
>
>Hi All,
>
>I'm definitely an RT novice, and could use some assistance. I have a
ticket
>Custom Field ("Progress"). It is a Select One Value field. When
someone
>selects the value "Sent", I want a new ticket created that is 'depended
on
>by' the original ticket. Can anyone help me with this please? I'm
desperate!
>
>Thanks!
>
>P.S. If the new ticket could automatically have an owner assigned upon
creation
> as well, that would be ideal. But the above request is definitely
priority.
_______________________________________________
http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users

Community help: http://wiki.bestpractical.com Commercial support: sales [at] bestpractical


Discover RT's hidden secrets with RT Essentials from O'Reilly Media.
Buy a copy at http://rtbook.bestpractical.com

_______________________________________________
http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users

Community help: http://wiki.bestpractical.com
Commercial support: sales [at] bestpractical


Discover RT's hidden secrets with RT Essentials from O'Reilly Media.
Buy a copy at http://rtbook.bestpractical.com


jrummel at imapp

Dec 2, 2009, 3:25 PM

Post #6 of 9 (705 views)
Permalink
Re: Auto-creating a 'dependant' ticket On Transaction [In reply to]

Thank you all so much! This is definitely getting me closer to what I want.
Is there any way you could help dumb-it-down a little more for my benefit
please? And to clarify a little, I don't want this to happen On Create,
only when my CF "Progress" is changed to "Send" in a ticket that already
exists. Is the following correct (or close)? If not, could you please make
corrections?:

CONDITION: User Defined
ACTION: User Defined
TEMPLATE: Global Template: Blank
STAGE: TransactionCreate

CUSTOM CONDITION:

if ($self->TicketObj->FirstCustomFieldValue('Progress') eq 'Send') {
return 1;
}
return 0;


CUSTOM ACTION PREPARATION CODE:

return 1;


CUSTOM ACTION CLEANUP CODE: (this is where I think I'm messing up)

my $trans = $self->TransactionObj;
my $tkt = $self->TicketObj;

my $requestors = [ $tkt->Requestors->MemberEmailAddresses];
my $new_tkt = RT::Ticket->new($RT::SystemUser); my ($id, $msg) =
$new_tkt->Create(
Queue => "Data Analysis",
Subject => $tkt->Subject,
Status => 'new',
Requestor => $requestors,
DependedOnBy => $tkt->Id)

return 1;

I know that the Custom Condition works, but the Action doesn't seem to be
working. Any help would greatly be appreciated. Thanks again!




Brumm,
Torsten / Kuehne + Nagel / Ham MI-ID wrote:
>
> Sorry, didn't read all,
>
> 1. Condition: CustomCondition:
>
> if ( ($self->TransactionObj->Type eq "CustomField" ||
> $self->TransactionObj->Type eq "Create" ) &&
> ($self->TicketObj->FirstCustomFieldValue('YourCustomFieldName') ||
> $self->TicketObj->FirstCustomFieldValue('YourCustomFieldName')) ) {
> return 1;
> }
> return 0;
>
> Action: Userdefine:
>
> Here the part of Gabriele but with the content check:
>
> return(0) unless ($self->TicketObj->Type eq 'ticket');
> if ($self->TicketObj->FirstCustomFieldValue('YourCustomFieldName') =~
> /Whatyouarelookingfor/i) {
>
> my $trans = $self->TransactionObj;
> my $tkt = $self->TicketObj;
>
> my $requestors = [ $tkt->Requestors->MemberEmailAddresses];
> my $new_tkt = RT::Ticket->new($RT::SystemUser); my ($id, $msg) =
> $new_tkt->Create(
> Queue => "your-queue-name-goes-here",
> Subject => $tkt->Subject,
> Status => 'new',
> Requestor => $requestors,
> DependedOnBy => $tkt->Id)
>
> return 1;
> }
> return 0;
>
>
> 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
> [mailto:rt-users-bounces [at] lists] Im Auftrag von Franzini,
> Gabriele [Nervianoms]
> Gesendet: Mittwoch, 25. November 2009 12:25
> An: jrummel [at] imapp
> Cc: rt-users [at] lists
> Betreff: Re: [rt-users] Auto-creating a 'dependant' ticket On Transaction
>
> Hello jrummel,
> From novice to novice, try a Scrip with something like:
>
> 1) Condition: as in OnCustomFieldValueChange (see wiki);
> 2) Action: User-defined, based upon DivideTicketIntoSubtasks (see
> wiki):
>
> my $trans = $self->TransactionObj;
> my $tkt = $self->TicketObj;
>
> my $requestors = [ $tkt->Requestors->MemberEmailAddresses];
> my $new_tkt = RT::Ticket->new($RT::SystemUser); my ($id, $msg) =
> $new_tkt->Create(
> Queue => "your-queue-name-goes-here",
> Subject => $tkt->Subject,
> Status => 'new',
> Requestor => $requestors,
> DependedOnBy => $tkt->Id)
>
> return 1;
>
> HTH,
> Gabriele Franzini
> ICT Applications Manager
> Nerviano Medical Sciences SRL
> PO Box 11 - Viale Pasteur 10
> 20014 Nerviano Italy
> tel +39 0331581477
> fax +39 0331581456
>
>>
>>Date: Tue, 24 Nov 2009 15:19:41 -0800 (PST)
>>From: jrummel <jrummel [at] imapp>
>>Subject: [rt-users] Auto-creating a 'dependant' ticket On Transaction
>>To: rt-users [at] lists
>>Message-ID: <26505061.post [at] talk>
>>Content-Type: text/plain; charset=us-ascii
>>
>>Hi All,
>>
>>I'm definitely an RT novice, and could use some assistance. I have a
> ticket
>>Custom Field ("Progress"). It is a Select One Value field. When
> someone
>>selects the value "Sent", I want a new ticket created that is 'depended
> on
>>by' the original ticket. Can anyone help me with this please? I'm
> desperate!
>>
>>Thanks!
>>
>>P.S. If the new ticket could automatically have an owner assigned upon
> creation
>> as well, that would be ideal. But the above request is definitely
> priority.
> _______________________________________________
> http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users
>
> Community help: http://wiki.bestpractical.com Commercial support:
> sales [at] bestpractical
>
>
> Discover RT's hidden secrets with RT Essentials from O'Reilly Media.
> Buy a copy at http://rtbook.bestpractical.com
>
> _______________________________________________
> http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users
>
> Community help: http://wiki.bestpractical.com
> Commercial support: sales [at] bestpractical
>
>
> Discover RT's hidden secrets with RT Essentials from O'Reilly Media.
> Buy a copy at http://rtbook.bestpractical.com
>
>

--
View this message in context: http://old.nabble.com/Auto-creating-a-%27dependant%27-ticket-On-Transaction-tp26505061p26618452.html
Sent from the Request Tracker - User mailing list archive at Nabble.com.

_______________________________________________
http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users

Community help: http://wiki.bestpractical.com
Commercial support: sales [at] bestpractical


Discover RT's hidden secrets with RT Essentials from O'Reilly Media.
Buy a copy at http://rtbook.bestpractical.com


Gabriele.Franzini at nervianoms

Dec 3, 2009, 4:35 AM

Post #7 of 9 (703 views)
Permalink
Re: Auto-creating a 'dependant' ticket On Transaction [In reply to]

Hi Jonathan, maybe the problem is this one below:

[...]

Requestor => $requestors,
DependedOnBy => $tkt->Id) ; <== SEMICOLON MISSING (my fault in the
first message!)

return 1;

Regards,
Gabriele


From: Jonathan Rummel <jrummel [at] imapp>
Subject: Re: [rt-users] Auto-creating a 'dependant' ticket On
Transaction
To: rt-users [at] lists
Message-ID: <26618452.post [at] talk>
Content-Type: text/plain; charset=UTF-8


Thank you all so much! This is definitely getting me closer to what I
want.
Is there any way you could help dumb-it-down a little more for my
benefit please? And to clarify a little, I don't want this to happen On
Create, only when my CF "Progress" is changed to "Send" in a ticket that
already exists. Is the following correct (or close)? If not, could you
please make
corrections?:

CONDITION: User Defined
ACTION: User Defined
TEMPLATE: Global Template: Blank
STAGE: TransactionCreate

CUSTOM CONDITION:

if ($self->TicketObj->FirstCustomFieldValue('Progress') eq 'Send') {
return 1;
}
return 0;


CUSTOM ACTION PREPARATION CODE:

return 1;


CUSTOM ACTION CLEANUP CODE: (this is where I think I'm messing up)

my $trans = $self->TransactionObj;
my $tkt = $self->TicketObj;

my $requestors = [ $tkt->Requestors->MemberEmailAddresses];
my $new_tkt = RT::Ticket->new($RT::SystemUser); my ($id, $msg) =
$new_tkt->Create(
Queue => "Data Analysis",
Subject => $tkt->Subject,
Status => 'new',
Requestor => $requestors,
DependedOnBy => $tkt->Id)

return 1;

I know that the Custom Condition works, but the Action doesn't seem to
be working. Any help would greatly be appreciated. Thanks again!

_______________________________________________
http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users

Community help: http://wiki.bestpractical.com
Commercial support: sales [at] bestpractical


Discover RT's hidden secrets with RT Essentials from O'Reilly Media.
Buy a copy at http://rtbook.bestpractical.com


jrummel at imapp

Dec 8, 2009, 2:46 PM

Post #8 of 9 (666 views)
Permalink
Re: Auto-creating a 'dependant' ticket On Transaction [In reply to]

Gabriele,

It works perfectly! Thanks! That's just what I needed!

Do you have any idea how to refer to a Custom Field within the newly created
ticket? Ex:

$new_tkt->Create(
Queue => "Data Analysis",
Subject => $tkt->Subject,
Status => 'new',
CUSTOM FIELD => "VALUE", <== (what's the proper syntax here for setting
the new ticket's cf value?)
Requestor => $requestors,
DependedOnBy => $tkt->Id);

Thanks again!
Jonathan


Franzini, Gabriele [Nervianoms] wrote:
>
> Hi Jonathan, maybe the problem is this one below:
>
> [...]
>
> Requestor => $requestors,
> DependedOnBy => $tkt->Id) ; <== SEMICOLON MISSING (my fault in the
> first message!)
>
> return 1;
>
> Regards,
> Gabriele
>
>
> From: Jonathan Rummel <jrummel [at] imapp>
> Subject: Re: [rt-users] Auto-creating a 'dependant' ticket On
> Transaction
> To: rt-users [at] lists
> Message-ID: <26618452.post [at] talk>
> Content-Type: text/plain; charset=UTF-8
>
>
> Thank you all so much! This is definitely getting me closer to what I
> want.
> Is there any way you could help dumb-it-down a little more for my
> benefit please? And to clarify a little, I don't want this to happen On
> Create, only when my CF "Progress" is changed to "Send" in a ticket that
> already exists. Is the following correct (or close)? If not, could you
> please make
> corrections?:
>
> CONDITION: User Defined
> ACTION: User Defined
> TEMPLATE: Global Template: Blank
> STAGE: TransactionCreate
>
> CUSTOM CONDITION:
>
> if ($self->TicketObj->FirstCustomFieldValue('Progress') eq 'Send') {
> return 1;
> }
> return 0;
>
>
> CUSTOM ACTION PREPARATION CODE:
>
> return 1;
>
>
> CUSTOM ACTION CLEANUP CODE: (this is where I think I'm messing up)
>
> my $trans = $self->TransactionObj;
> my $tkt = $self->TicketObj;
>
> my $requestors = [ $tkt->Requestors->MemberEmailAddresses];
> my $new_tkt = RT::Ticket->new($RT::SystemUser); my ($id, $msg) =
> $new_tkt->Create(
> Queue => "Data Analysis",
> Subject => $tkt->Subject,
> Status => 'new',
> Requestor => $requestors,
> DependedOnBy => $tkt->Id)
>
> return 1;
>
> I know that the Custom Condition works, but the Action doesn't seem to
> be working. Any help would greatly be appreciated. Thanks again!
>
> _______________________________________________
> http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users
>
> Community help: http://wiki.bestpractical.com
> Commercial support: sales [at] bestpractical
>
>
> Discover RT's hidden secrets with RT Essentials from O'Reilly Media.
> Buy a copy at http://rtbook.bestpractical.com
>
>

--
View this message in context: http://old.nabble.com/Auto-creating-a-%27dependant%27-ticket-On-Transaction-tp26505061p26702202.html
Sent from the Request Tracker - User mailing list archive at Nabble.com.

_______________________________________________
http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users

Community help: http://wiki.bestpractical.com
Commercial support: sales [at] bestpractical


Discover RT's hidden secrets with RT Essentials from O'Reilly Media.
Buy a copy at http://rtbook.bestpractical.com


Gabriele.Franzini at nervianoms

Dec 10, 2009, 7:09 AM

Post #9 of 9 (640 views)
Permalink
Re: Auto-creating a 'dependant' ticket On Transaction [In reply to]

Hi Jonathan,

After the code for creation of dependent ticket,

> my $new_tkt = RT::Ticket->new($RT::SystemUser); my ($id, $msg) =
> $new_tkt->Create(
> Queue => "Data Analysis",
> Subject => $tkt->Subject,
> Status => 'new',
> Requestor => $requestors,
> DependedOnBy => $tkt->Id);

Try to add something like this one:

my $CFName = "Your CF NAME goes here";
my $ValueToAssign = "Your VALUE goes here";
my $RecTransaction = 1;
my $QueueObj = $new_tkt->QueueObj;
my $CFObj = RT::CustomField->new( $QueueObj->CurrentUser );
$CFObj->LoadByName( Name => $CFName);
my( $id, $msg ) = $new_tkt->AddCustomFieldValue(
Field => $CFObj->id,
Value => $ValueToAssign,
RecordTransaction => $RecTransaction );

Hope it helps, Sorry but I have no time to test it...
Gabriele

------------------------------

Message: 3
Date: Tue, 8 Dec 2009 14:46:49 -0800 (PST)
From: Jonathan Rummel <jrummel [at] imapp>
Subject: Re: [rt-users] Auto-creating a 'dependant' ticket On
Transaction
To: rt-users [at] lists
Message-ID: <26702202.post [at] talk>
Content-Type: text/plain; charset=us-ascii


Gabriele,

It works perfectly! Thanks! That's just what I needed!

Do you have any idea how to refer to a Custom Field within the newly
created ticket? Ex:

$new_tkt->Create(
Queue => "Data Analysis",
Subject => $tkt->Subject,
Status => 'new',
CUSTOM FIELD => "VALUE", <== (what's the proper syntax here for
setting the new ticket's cf value?)
Requestor => $requestors,
DependedOnBy => $tkt->Id);

Thanks again!
Jonathan

_______________________________________________
http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users

Community help: http://wiki.bestpractical.com
Commercial support: sales [at] bestpractical


Discover RT's hidden secrets with RT Essentials from O'Reilly Media.
Buy a copy at http://rtbook.bestpractical.com

Request Tracker users RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.