[otrs-cvs] otrs/Kernel/System Ticket.pm,1.584,1.585
"CVS commits notifications of OTRS.org" <[email protected]>
| Newsgroups | gmane.comp.otrs.cvs |
|---|---|
| Message-ID | <[email protected]> |
Comments:
Update of /home/cvs/otrs/Kernel/System
In directory lancelot:/tmp/cvs-serv12703/Kernel/System
Modified Files:
Ticket.pm
Log Message:
Fixed bug#8936 - Ticket close date is empty when ticket is created in closed state.
Author: mb
Index: Ticket.pm
===================================================================
RCS file: /home/cvs/otrs/Kernel/System/Ticket.pm,v
retrieving revision 1.584
retrieving revision 1.585
diff -2 -u -d -r1.584 -r1.585
--- Ticket.pm 20 Nov 2012 15:39:56 -0000 1.584
+++ Ticket.pm 24 Nov 2012 13:23:56 -0000 1.585
@@ -1389,5 +1389,5 @@
}
- # get close time
+ # get close state types
my @List = $Self->{StateObject}->StateGetStatesByType(
StateType => ['closed'],
@@ -1396,13 +1396,19 @@
return if !@List;
- # Get id for StateUpdate;
- my $HistoryTypeID = $Self->HistoryTypeLookup( Type => 'StateUpdate' );
- return if !$HistoryTypeID;
+ # Get id for history types
+ my @HistoryTypeIDs;
+ for my $HistoryType (qw ( StateUpdate NewTicket )) {
+ push @HistoryTypeIDs, $Self->HistoryTypeLookup( Type => $HistoryType );
+ }
return if !$Self->{DBObject}->Prepare(
- SQL => "SELECT create_time FROM ticket_history WHERE ticket_id = ? AND "
- . " state_id IN (${\(join ', ', sort @List)}) AND history_type_id = ? "
- . " ORDER BY create_time DESC",
- Bind => [ \$Param{TicketID}, \$HistoryTypeID ],
+ SQL => "
+ SELECT create_time
+ FROM ticket_history
+ WHERE ticket_id = ?
+ AND state_id IN (${\(join ', ', sort @List)})
+ AND history_type_id IN (${\(join ', ', sort @HistoryTypeIDs)})
+ ORDER BY create_time DESC",
+ Bind => [ \$Param{TicketID} ],
Limit => 1,
);
---------------------------------------------------------------------
OTRS mailing list: cvs-log - Webpage: http://otrs.org/
Archive: http://lists.otrs.org/pipermail/cvs-log
To unsubscribe: http://lists.otrs.org/cgi-bin/listinfo/cvs-log