[prev in list] [next in list] [prev in thread] [next in thread]
List: rt-users
Subject: Re: [rt-users] re-set date field
From: Kevin Falcone <falcone () bestpractical ! com>
Date: 2010-08-30 18:59:52
Message-ID: 20100830185952.GY550 () jibsheet ! com
[Download RAW message or body]
[Attachment #2 (multipart/signed)]
On Mon, Aug 30, 2010 at 11:23:21AM -0700, Kenneth Crocker wrote:
> I don't understand. The CF is a "Select date" and th3e code is as follows:
Kenn
You said 'date field' so I assumed you meant Due or another built in
RT date field. Since you're running an experimentally patched RT, I'm
not sure how you should do what you want.
-kevin
> # re-set the CF "Work-Completed Date" if it exists
>
> my $ticket = $self->TicketObj;
> my $trans = $self->TransactionObj;
> my $cf_obj = RT::CustomField->new($RT::SystemUser);
> my $new_value = 0;
> my $cf_name = "Work-Completed Date";
> my $Completed_Date = $ticket->FirstCustomFieldValue('Work-Completed Date');
>
> if ($Completed_Date)
> {
> $cf_obj->LoadByName(Name=>$cf_name);
> $RT::Logger->debug("Loaded\$cf_obj->Name = ". $cf_obj->Name() ."\n");
> $ticket->AddCustomFieldValue(Field=>$cf_obj, Value=>$new_value, RecordTransaction=>0);
> }
>
> I'm not sure what it is I should do differently.
>
> Thanks.
>
> Kenn
> LBNL
>
> On Mon, Aug 30, 2010 at 9:57 AM, Kevin Falcone <[1]falcone@bestpractical.com> wrote:
>
> On Mon, Aug 30, 2010 at 09:15:17AM -0700, Kenneth Crocker wrote:
> > The code doesn't blow up (with a simple 0), but I get 1970 on all my search results. I
> need to
> > get rid of that somehow. Any ideas? Thanks.
> > > 0 should be fine, depends on how you're setting the date
>
> The key part of my statement is "Depends on how you're setting the
> date"
> -kevin
>
> RT Training in Washington DC, USA on Oct 25 & 26 2010
> Last one this year -- Learn how to get the most out of RT!
>
> References
>
> Visible links
> 1. mailto:falcone@bestpractical.com
>
> RT Training in Washington DC, USA on Oct 25 & 26 2010
> Last one this year -- Learn how to get the most out of RT!
[Attachment #5 (application/pgp-signature)]
RT Training in Washington DC, USA on Oct 25 & 26 2010
Last one this year -- Learn how to get the most out of RT!
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic