projects
/
freeside.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch 'master' of git.freeside.biz:/home/git/freeside
[freeside.git]
/
rt
/
lib
/
RT
/
Ticket.pm
diff --git
a/rt/lib/RT/Ticket.pm
b/rt/lib/RT/Ticket.pm
index
e7478ad
..
002d323
100755
(executable)
--- a/
rt/lib/RT/Ticket.pm
+++ b/
rt/lib/RT/Ticket.pm
@@
-2,7
+2,7
@@
#
# COPYRIGHT:
#
#
# COPYRIGHT:
#
-# This software is Copyright (c) 1996-201
5
Best Practical Solutions, LLC
+# This software is Copyright (c) 1996-201
7
Best Practical Solutions, LLC
# <sales@bestpractical.com>
#
# (Except where explicitly superseded by other copyright notices)
# <sales@bestpractical.com>
#
# (Except where explicitly superseded by other copyright notices)
@@
-316,6
+316,10
@@
sub Create {
unless defined $args{'Priority'};
# Dates
unless defined $args{'Priority'};
# Dates
+
+ my $Now = RT::Date->new( $self->CurrentUser );
+ $Now->SetToNow();
+
#TODO we should see what sort of due date we're getting, rather +
# than assuming it's in ISO format.
#TODO we should see what sort of due date we're getting, rather +
# than assuming it's in ISO format.
@@
-325,7
+329,7
@@
sub Create {
$Due->Set( Format => 'ISO', Value => $args{'Due'} );
}
elsif ( my $due_in = $QueueObj->DefaultDueIn ) {
$Due->Set( Format => 'ISO', Value => $args{'Due'} );
}
elsif ( my $due_in = $QueueObj->DefaultDueIn ) {
- $Due->Set
ToNow
;
+ $Due->Set
( Format => 'ISO', Value => $Now->ISO )
;
$Due->AddDays( $due_in );
}
$Due->AddDays( $due_in );
}
@@
-346,7
+350,7
@@
sub Create {
# If the status is not an initial status, set the started date
elsif ( !$cycle->IsInitial($args{'Status'}) ) {
# If the status is not an initial status, set the started date
elsif ( !$cycle->IsInitial($args{'Status'}) ) {
- $Started->Set
ToNow
;
+ $Started->Set
( Format => 'ISO', Value => $Now->ISO )
;
}
my $Resolved = RT::Date->new( $self->CurrentUser );
}
my $Resolved = RT::Date->new( $self->CurrentUser );
@@
-360,7
+364,7
@@
sub Create {
$RT::Logger->debug( "Got a ". $args{'Status'}
."(inactive) ticket with undefined resolved date. Setting to now."
);
$RT::Logger->debug( "Got a ". $args{'Status'}
."(inactive) ticket with undefined resolved date. Setting to now."
);
- $Resolved->Set
ToNow
;
+ $Resolved->Set
( Format => 'ISO', Value => $Now->ISO )
;
}
# Dealing with time fields
}
# Dealing with time fields
@@
-390,6
+394,7
@@
sub Create {
TimeEstimated => $args{'TimeEstimated'},
TimeLeft => $args{'TimeLeft'},
Type => $args{'Type'},
TimeEstimated => $args{'TimeEstimated'},
TimeLeft => $args{'TimeLeft'},
Type => $args{'Type'},
+ Created => $Now->ISO,
Starts => $Starts->ISO,
Started => $Started->ISO,
Resolved => $Resolved->ISO,
Starts => $Starts->ISO,
Started => $Started->ISO,
Resolved => $Resolved->ISO,
@@
-757,13
+762,14
@@
sub DeleteWatcher {
-=head2 SquelchMailTo [EMAIL]
-
-Takes an optional email address to never email about updates to this ticket.
-
+=head2 SquelchMailTo ADDRESSES
-Returns an array of the RT::Attribute objects for this ticket's 'SquelchMailTo' attributes.
+Takes a list of email addresses to never email about updates to this ticket.
+Subsequent calls to this method add, rather than replace, the list of
+squelched addresses.
+Returns an array of the L<RT::Attribute> objects for this ticket's
+'SquelchMailTo' attributes.
=cut
=cut
@@
-784,7
+790,7
@@
sub SquelchMailTo {
sub _SquelchMailTo {
my $self = shift;
sub _SquelchMailTo {
my $self = shift;
-
if
(@_) {
+
while
(@_) {
my $attr = shift;
$self->AddAttribute( Name => 'SquelchMailTo', Content => $attr )
unless grep { $_->Content eq $attr }
my $attr = shift;
$self->AddAttribute( Name => 'SquelchMailTo', Content => $attr )
unless grep { $_->Content eq $attr }
@@
-1098,6
+1104,11
@@
sub TransactionAddresses {
$attachments->Columns( qw( id Headers TransactionId));
$attachments->Limit(
$attachments->Columns( qw( id Headers TransactionId));
$attachments->Limit(
+ FIELD => 'Parent',
+ VALUE => 0,
+ );
+
+ $attachments->Limit(
ALIAS => $attachments->TransactionAlias,
FIELD => 'Type',
OPERATOR => 'IN',
ALIAS => $attachments->TransactionAlias,
FIELD => 'Type',
OPERATOR => 'IN',