Setting dates with Callbacks

Hi all,

I’ve followed the instructions on the Wiki to include the possibility to
edit the Custom Fields in replies and comments, and this worked great.
Thanks!

But after that I tried to also include Dates (without any real knowledge
about what I’m doing):

----- BeforeMessageBox -----
<%INIT>
my $TicketObj = LoadTicket($ARGS{‘id’});
</%INIT>

<& /Ticket/Elements/EditCustomFields, TicketObj => $TicketObj &>
<& /Ticket/Elements/EditDates, TicketObj => $TicketObj &>

----- BeforeDisplay -----
<%INIT>
my $ARGSRef = $ARGS{‘ARGSRef’};
my $TicketObj = LoadTicket($ARGS{‘id’});

if (!$TicketObj) {
$TicketObj = RT::Ticket->new($session{‘CurrentUser’});
$TicketObj = LoadTicket($ARGS{‘id’});
}

my @cf_results = ProcessTicketCustomFieldUpdates(ARGSRef => $ARGSRef);
my @dresults = ProcessTicketDates(TicketObj => $TicketObj, ARGSRef =>
$ARGSRef);
</%INIT>

What am I doing wrong?

Best Regards - Anders Ekstrand

Hi Anders,
What version of RT are you using?

JOn 8/10/05, Anders Ekstrand anders.ekstrand@drutt.com wrote:

Hi all,

I’ve followed the instructions on the Wiki to include the possibility to
edit the Custom Fields in replies and comments, and this worked great.
Thanks!

But after that I tried to also include Dates (without any real knowledge
about what I’m doing):

----- BeforeMessageBox -----
<%INIT>
my $TicketObj = LoadTicket($ARGS{‘id’});
</%INIT>

<& /Ticket/Elements/EditCustomFields, TicketObj => $TicketObj &>
<& /Ticket/Elements/EditDates, TicketObj => $TicketObj &>

----- BeforeDisplay -----
<%INIT>
my $ARGSRef = $ARGS{‘ARGSRef’};
my $TicketObj = LoadTicket($ARGS{‘id’});

if (!$TicketObj) {
$TicketObj = RT::Ticket->new($session{‘CurrentUser’});
$TicketObj = LoadTicket($ARGS{‘id’});
}

my @cf_results = ProcessTicketCustomFieldUpdates(ARGSRef => $ARGSRef);
my @dresults = ProcessTicketDates(TicketObj => $TicketObj, ARGSRef =>
$ARGSRef);
</%INIT>

What am I doing wrong?

Best Regards - Anders Ekstrand


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

Be sure to check out the RT Wiki at http://wiki.bestpractical.com

Hi Jay,

It’s 3.4.2.

Best Regards - Anders