[Rt-commit] [svn] r1578 - rtir/branches/1.1-TESTING/lib/RT/Action
leira at pallas.eruditorum.org
leira at pallas.eruditorum.org
Wed Sep 29 02:59:46 EDT 2004
Author: leira
Date: Wed Sep 29 02:59:46 2004
New Revision: 1578
Modified:
rtir/branches/1.1-TESTING/lib/RT/Action/RTIR_SetStartsByBizHours.pm
rtir/branches/1.1-TESTING/lib/RT/Action/RTIR_SetStartsToNow.pm
Log:
Check for Unix style date, not the string "Not set"
Modified: rtir/branches/1.1-TESTING/lib/RT/Action/RTIR_SetStartsByBizHours.pm
==============================================================================
--- rtir/branches/1.1-TESTING/lib/RT/Action/RTIR_SetStartsByBizHours.pm (original)
+++ rtir/branches/1.1-TESTING/lib/RT/Action/RTIR_SetStartsByBizHours.pm Wed Sep 29 02:59:46 2004
@@ -61,7 +61,7 @@
sub Prepare {
my $self = shift;
- if ($self->TicketObj->StartsObj->AsString eq "Not set") {
+ if ($self->TicketObj->StartsObj->Unix < 0) {
return 1;
} else {
return 0;
Modified: rtir/branches/1.1-TESTING/lib/RT/Action/RTIR_SetStartsToNow.pm
==============================================================================
--- rtir/branches/1.1-TESTING/lib/RT/Action/RTIR_SetStartsToNow.pm (original)
+++ rtir/branches/1.1-TESTING/lib/RT/Action/RTIR_SetStartsToNow.pm Wed Sep 29 02:59:46 2004
@@ -61,7 +61,14 @@
sub Prepare {
my $self = shift;
- if ($self->TicketObj->StartsObj->AsString eq "Not set") {
+ # if triggered by a "Set Starts" transaction, return 0
+ if ($self->TransactionObj->Type eq 'Set' &&
+ $self->TransactionObj->Field eq 'Starts') {
+ return 0;
+ }
+
+ # set if the Starts value isn't already set
+ if ($self->TicketObj->StartsObj->Unix < 0) {
return 1;
} else {
return 0;
More information about the Rt-commit
mailing list