[Rt-commit] rt branch, 3.9-trunk, updated. rt-3.8.8-874-g92ff89d
? sunnavy
sunnavy at bestpractical.com
Mon Sep 27 01:05:36 EDT 2010
The branch, 3.9-trunk has been updated
via 92ff89d11038e17b69d0312e77005f0bc3d2619b (commit)
from 64b18c0f0478cbcdf2f07d00394fbe2b77fbf818 (commit)
Summary of changes:
lib/RT/Ticket_Overlay.pm | 14 ++++++++++----
1 files changed, 10 insertions(+), 4 deletions(-)
- Log -----------------------------------------------------------------
commit 92ff89d11038e17b69d0312e77005f0bc3d2619b
Author: sunnavy <sunnavy at bestpractical.com>
Date: Mon Sep 27 12:55:14 2010 +0800
add SetStarted option to ticket->SetStarted
diff --git a/lib/RT/Ticket_Overlay.pm b/lib/RT/Ticket_Overlay.pm
index 934702c..7c5488c 100755
--- a/lib/RT/Ticket_Overlay.pm
+++ b/lib/RT/Ticket_Overlay.pm
@@ -3034,9 +3034,10 @@ sub ValidateStatus {
Set this ticket\'s status. STATUS can be one of: new, open, stalled, resolved, rejected or deleted.
-Alternatively, you can pass in a list of named parameters (Status => STATUS, Force => FORCE). If FORCE is true, ignore unresolved dependencies and force a status change.
-
-
+Alternatively, you can pass in a list of named parameters (Status => STATUS, Force => FORCE, SetStarted => SETSTARTED ).
+If FORCE is true, ignore unresolved dependencies and force a status change.
+if SETSTARTED is true( it's the default value), set Started to current datetime if Started
+is not set and the status is changed from initial to not initial.
=cut
@@ -3050,6 +3051,11 @@ sub SetStatus {
%args = (@_);
}
+ # this only allows us to SetStarted, not we must SetStarted.
+ # this option was added for rtir initially
+ $args{SetStarted} = 1 unless exists $args{SetStarted};
+
+
my $lifecycle = $self->QueueObj->lifecycle;
my $new = $args{'Status'};
@@ -3078,7 +3084,7 @@ sub SetStatus {
$raw_started->Set(Format => 'ISO', Value => $self->__Value('Started'));
#If we're changing the status from new, record that we've started
- if ( $lifecycle->is_initial($old) && !$lifecycle->is_initial($new) && !$raw_started->Unix) {
+ if ( $args{SetStarted} && $lifecycle->is_initial($old) && !$lifecycle->is_initial($new) && !$raw_started->Unix) {
#Set the Started time to "now"
$self->_Set(
Field => 'Started',
-----------------------------------------------------------------------
More information about the Rt-commit
mailing list