b009e220 by Dusan Vuckovic

Fixed: TicketTypeUpdate not seen in Ticket history (bug#12702).

1 parent 177f6f97
......@@ -82,10 +82,11 @@
- 2015-11-27 Improved Generic Agent performance at deleting old execution times. Thanks to Moritz Lenz @ noris networks.
- 2015-11-27 Improved command Maint::Ticket::InvalidUserCleanup. It can now now both unlock tickets of invalid users and also (optionally) change their state to make sure they will not be overlooked. Thanks to Moritz Lenz @ noris networks.
#5.0.18 2017-??-??
#5.0.19 2017-??-??
- 2017-03-23 Fixed bug#[12702](https://bugs.otrs.org/show_bug.cgi?id=12702) - TicketTypeUpdate not seen in Ticket history.
#5.0.18 2017-03-28
- 2017-02-22 Updated translations, thanks to all translators.
- 2017-03-22 Updated translations, thanks to all translators.
- 2017-03-22 Fixed bug#[12716](https://bugs.otrs.org/show_bug.cgi?id=12716)(PR#1667) - Activity dialog causes an Error in customer interface. Thanks to S7!
- 2017-03-20 Fixed bug#[12684](https://bugs.otrs.org/show_bug.cgi?id=12684)(PR#1649) - The format buttons are missing from the stacked area chart on the dashboard if the language is not English. Thanks to S7!
- 2017-03-17 Fixed bug#[12683](https://bugs.otrs.org/show_bug.cgi?id=12683)(PR#1651) - There is a difference between key and content display in the Events Ticket Calendar. Thanks to S7!
......
......@@ -636,6 +636,18 @@ sub TicketCreate {
);
}
if ( $Kernel::OM->Get('Kernel::Config')->Get('Ticket::Type') ) {
# Insert history record for ticket type, so that initial value can be seen.
# Please see bug#12702 for more information.
$Self->HistoryAdd(
TicketID => $TicketID,
HistoryType => 'TypeUpdate',
Name => "\%\%$Param{Type}\%\%$Param{TypeID}",
CreateUserID => $Param{UserID},
);
}
# set customer data if given
if ( $Param{CustomerNo} || $Param{CustomerID} || $Param{CustomerUser} ) {
$Self->TicketCustomerSet(
......
......@@ -27,6 +27,12 @@ $Kernel::OM->ObjectParamAdd(
);
my $Helper = $Kernel::OM->Get('Kernel::System::UnitTest::Helper');
# Turn on the ticket type feature.
$Kernel::OM->Get('Kernel::Config')->Set(
Key => 'Ticket::Type',
Value => 1,
);
$Kernel::OM->Get('Kernel::System::Cache')->CleanUp();
my @Tests = (
......@@ -92,6 +98,19 @@ my @Tests = (
HistoryType => 'NewTicket',
Type => 'Unclassified',
},
# Bug 12702 - TicketHistoryGet() initial ticket type update
{
CreateBy => 1,
HistoryType => 'TypeUpdate',
Queue => 'Raw',
OwnerID => 1,
PriorityID => 3,
State => 'new',
Type => 'Unclassified',
TypeID => '1',
},
{
CreateBy => 1,
HistoryType => 'CustomerUpdate',
......@@ -311,6 +330,7 @@ for my $Test (@Tests) {
my %LookForHistoryTypes = (
NewTicket => 1,
TypeUpdate => 1,
OwnerUpdate => 1,
CustomerUpdate => 1,
);
......