[Rt-commit] r18567 - in rt/3.999/trunk: . lib/RT share/html/Elements share/html/NoAuth/iCal share/html/Search share/html/Ticket/Elements t/ticket
sartak at bestpractical.com
sartak at bestpractical.com
Tue Feb 24 20:40:07 EST 2009
Author: sartak
Date: Tue Feb 24 20:40:07 2009
New Revision: 18567
Modified:
rt/3.999/trunk/ (props changed)
rt/3.999/trunk/lib/RT/Record.pm
rt/3.999/trunk/lib/RT/ScripAction/LinearEscalate.pm
rt/3.999/trunk/share/html/Elements/ColumnMap
rt/3.999/trunk/share/html/NoAuth/iCal/dhandler
rt/3.999/trunk/share/html/Search/Results.rdf
rt/3.999/trunk/share/html/Search/Results.tsv
rt/3.999/trunk/share/html/Ticket/Elements/ShowDates
rt/3.999/trunk/t/ticket/search_by_txn.t
Log:
r80527 at onn: sartak | 2009-02-24 20:39:58 -0500
Remove created_obj since created returns the object
Modified: rt/3.999/trunk/lib/RT/Record.pm
==============================================================================
--- rt/3.999/trunk/lib/RT/Record.pm (original)
+++ rt/3.999/trunk/lib/RT/Record.pm Tue Feb 24 20:40:07 2009
@@ -359,22 +359,12 @@
-sub created_obj {
- my $self = shift;
- my $obj = RT::Date->new();
-
- $obj->set( format => 'sql', value => $self->created );
-
- return $obj;
-}
-
-
#
# TODO: This should be deprecated
#
sub age_as_string {
my $self = shift;
- return ( $self->created_obj->age_as_string() );
+ return ( $self->created->age_as_string() );
}
Modified: rt/3.999/trunk/lib/RT/ScripAction/LinearEscalate.pm
==============================================================================
--- rt/3.999/trunk/lib/RT/ScripAction/LinearEscalate.pm (original)
+++ rt/3.999/trunk/lib/RT/ScripAction/LinearEscalate.pm Tue Feb 24 20:40:07 2009
@@ -188,7 +188,7 @@
# increment priority according to the formula
my $starts = $ticket->starts_obj->unix;
- $starts = $ticket->created_obj->unix unless $starts > 0;
+ $starts = $ticket->created->epoch unless $starts > 0;
my $now = time;
# do nothing if we didn't reach starts or created date
Modified: rt/3.999/trunk/share/html/Elements/ColumnMap
==============================================================================
--- rt/3.999/trunk/share/html/Elements/ColumnMap (original)
+++ rt/3.999/trunk/share/html/Elements/ColumnMap Tue Feb 24 20:40:07 2009
@@ -65,12 +65,12 @@
created => {
attribute => 'Created',
title => 'Created', # loc
- value => sub { return $_[0]->created_obj->as_string }
+ value => sub { return $_[0]->created }
},
created_relative => {
attribute => 'Created',
title => 'Created', # loc
- value => sub { return $_[0]->created_obj->age_as_string }
+ value => sub { return $_[0]->created->age_as_string }
},
created_by => {
attribute => 'CreatedBy',
Modified: rt/3.999/trunk/share/html/NoAuth/iCal/dhandler
==============================================================================
--- rt/3.999/trunk/share/html/NoAuth/iCal/dhandler (original)
+++ rt/3.999/trunk/share/html/NoAuth/iCal/dhandler Tue Feb 24 20:40:07 2009
@@ -88,7 +88,7 @@
while (my $t = $tickets->next) {
next unless $t->due_obj->unix > 0;
- my $starttime = $t->starts_obj->unix > 0 ? $t->starts_obj : $t->created_obj;
+ my $starttime = $t->starts_obj->unix > 0 ? $t->starts_obj : $t->created;
my $now = RT::Date->new; $now->set_to_now;
my $start = Data::ICal::Entry::Event->new;
@@ -97,7 +97,7 @@
url => RT->config->get('WebURL') . "?q=".$t->id,
organizer => $t->owner_obj->name,
dtstamp => $now->iCal,
- created => $t->created_obj->iCal,
+ created => $t->created->iCal,
'last-modified' => $t->last_updated_obj->iCal,
) for $start, $end;
Modified: rt/3.999/trunk/share/html/Search/Results.rdf
==============================================================================
--- rt/3.999/trunk/share/html/Search/Results.rdf (original)
+++ rt/3.999/trunk/share/html/Search/Results.rdf Tue Feb 24 20:40:07 2009
@@ -90,7 +90,7 @@
description => $Ticket->transactions->first->content,
dc => {
creator => $creator_str,
- date => $Ticket->created_obj->rfc2822,
+ date => $Ticket->created->rfc2822,
},
guid => $Ticket->queue . '_' . $Ticket->id,
);
Modified: rt/3.999/trunk/share/html/Search/Results.tsv
==============================================================================
--- rt/3.999/trunk/share/html/Search/Results.tsv (original)
+++ rt/3.999/trunk/share/html/Search/Results.tsv Tue Feb 24 20:40:07 2009
@@ -71,7 +71,7 @@
my @attrs = qw( id queue_obj->name subject status time_estimated time_worked time_left priority final_priority owner_obj->name
requestors->member_emails_as_string cc->member_emails_as_string admin_cc->member_emails_as_string
- due_obj->iso told_obj->iso created_obj->iso resolved_obj->iso last_updated_obj->iso);
+ due_obj->iso told_obj->iso created resolved_obj->iso last_updated_obj->iso);
$r->content_type('application/vnd.ms-excel');
while ( my $Ticket = $Tickets->next()) {
Modified: rt/3.999/trunk/share/html/Ticket/Elements/ShowDates
==============================================================================
--- rt/3.999/trunk/share/html/Ticket/Elements/ShowDates (original)
+++ rt/3.999/trunk/share/html/Ticket/Elements/ShowDates Tue Feb 24 20:40:07 2009
@@ -48,7 +48,7 @@
<table>
<tr>
<td class="label date Created"><&|/l&>Created</&>:</td>
- <td class="value date Created"><% $ticket->created_obj->as_string %></td>
+ <td class="value date Created"><% $ticket->created %></td>
</tr>
<tr>
<td class="label date starts"><&|/l&>Starts</&>:</td>
Modified: rt/3.999/trunk/t/ticket/search_by_txn.t
==============================================================================
--- rt/3.999/trunk/t/ticket/search_by_txn.t (original)
+++ rt/3.999/trunk/t/ticket/search_by_txn.t Tue Feb 24 20:40:07 2009
@@ -26,11 +26,11 @@
isa_ok($txnobj, 'RT::Model::Transaction');
-ok($txnobj->created_obj->iso);
+ok($txnobj->created->iso);
my ( $sid,$smsg) = $txnobj->__set(column => 'created', value => '2005-08-05 20:00:56');
ok($sid,$smsg);
is($txnobj->created,'2005-08-05 20:00:56');
-is($txnobj->created_obj->iso,'2005-08-05 20:00:56');
+is($txnobj->created->iso,'2005-08-05 20:00:56');
$tix->from_sql(qq{Updated = "2005-08-05" AND subject = "$SUBJECT"});
is( $tix->count, 1);
More information about the Rt-commit
mailing list