Skip to content

Commit

Permalink
Fixed: Pending date selection impossible due ACL limitation (bug#11836).
Browse files Browse the repository at this point in the history
  • Loading branch information
carlosfrodriguez committed Mar 22, 2016
1 parent 6b44389 commit 8f4a69a
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 28 deletions.
1 change: 1 addition & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
- 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.9 2016-??-??
- 2016-03-22 Fixed bug#[11836](http://bugs.otrs.org/show_bug.cgi?id=11836) - Pending date selection impossible due ACL limitation.
- 2016-03-22 Fixed bug#[11956](http://bugs.otrs.org/show_bug.cgi?id=11956) - locked tickets for invalid users are not shown in support data collector.
- 2016-03-22 Fixed bug#[11954](http://bugs.otrs.org/show_bug.cgi?id=11954) - Can't handle double quotes as option value in modernized InputFields, thanks to Thorsten Eckel.
- 2016-03-22 Fixed bug#[11944](http://bugs.otrs.org/show_bug.cgi?id=11944) - Inline images possible although image functionality is disabled.
Expand Down
55 changes: 27 additions & 28 deletions Kernel/Modules/AgentTicketActionCommon.pm
Original file line number Diff line number Diff line change
Expand Up @@ -1814,40 +1814,39 @@ sub _Mask {
Data => \%Param,
);

STATEID:
for my $StateID ( sort keys %StateList ) {
if ( IsArrayRefWithData( $Config->{StateType} ) ) {

next STATEID if !$StateID;
STATETYPE:
for my $StateType ( @{ $Config->{StateType} } ) {

# get state data
my %StateData = $Kernel::OM->Get('Kernel::System::State')->StateGet( ID => $StateID );
next STATETYPE if !$StateType;
next STATETYPE if $StateType !~ /pending/i;

next STATEID if $StateData{TypeName} !~ /pending/i;

# get used calendar
my $Calendar = $TicketObject->TicketCalendarGet(
%Ticket,
);
# get used calendar
my $Calendar = $TicketObject->TicketCalendarGet(
%Ticket,
);

$Param{DateString} = $LayoutObject->BuildDateSelection(
%Param,
Format => 'DateInputFormatLong',
YearPeriodPast => 0,
YearPeriodFuture => 5,
DiffTime => $ConfigObject->Get('Ticket::Frontend::PendingDiffTime')
|| 0,
Class => $Param{DateInvalid} || ' ',
Validate => 1,
ValidateDateInFuture => 1,
Calendar => $Calendar,
);
$Param{DateString} = $LayoutObject->BuildDateSelection(
%Param,
Format => 'DateInputFormatLong',
YearPeriodPast => 0,
YearPeriodFuture => 5,
DiffTime => $ConfigObject->Get('Ticket::Frontend::PendingDiffTime')
|| 0,
Class => $Param{DateInvalid} || ' ',
Validate => 1,
ValidateDateInFuture => 1,
Calendar => $Calendar,
);

$LayoutObject->Block(
Name => 'StatePending',
Data => \%Param,
);
$LayoutObject->Block(
Name => 'StatePending',
Data => \%Param,
);

last STATEID;
last STATETYPE;
}
}
}

Expand Down

0 comments on commit 8f4a69a

Please sign in to comment.