Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue #4185: Fixed PossibleValues handling in CustomerTicketProcess. #4186

Merged
merged 2 commits into from
Feb 24, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 8 additions & 17 deletions Kernel/Modules/CustomerTicketProcess.pm
Original file line number Diff line number Diff line change
Expand Up @@ -103,9 +103,7 @@ sub Run {
$Self->{IDSuffix} = $ActivityDialogEntityID ? $ActivityDialogEntityID =~ s/^ActivityDialog-/_/r : '';

# get needed objects
my $LayoutObject = $Kernel::OM->Get('Kernel::Output::HTML::Layout');
my $TicketObject = $Kernel::OM->Get('Kernel::System::Ticket');
my $ActivityDialogObject = $Kernel::OM->Get('Kernel::System::ProcessManagement::ActivityDialog');
my $LayoutObject = $Kernel::OM->Get('Kernel::Output::HTML::Layout');

# some fields should be skipped for the customer interface
my $SkipFields = [ 'Owner', 'Responsible', 'Lock', 'PendingTime', 'CustomerID' ];
Expand Down Expand Up @@ -257,10 +255,6 @@ sub _RenderAjax {
my @JSONCollector;
my $Services;

# All submitted DynamicFields
# get dynamic field values form http request
my %DynamicFieldValues;

# get needed objects
my $ConfigObject = $Kernel::OM->Get('Kernel::Config');
my $ParamObject = $Kernel::OM->Get('Kernel::System::Web::Request');
Expand Down Expand Up @@ -801,7 +795,7 @@ sub _GetParam {
next DIALOGFIELD;
}

# if no Submitted nore Ticket Param get ActivityDialog Config's Param
# if no Submitted nor Ticket Param get ActivityDialog Config's Param
$Value = $ActivityDialog->{Fields}{$CurrentField}{DefaultValue};

if ($Value) {
Expand Down Expand Up @@ -938,11 +932,9 @@ sub _OutputActivityDialog {
# get necessary objects
# CustomerTicketProcess gets only called by CustomerTicketZoom and returns its HTML to there
# for HTML generation a separate LayoutObject is created; all JS-stuff has to be done with the one of CustomerTicketZoom (e.g. in dynamic fields)
my $LayoutObjectZoom = $Kernel::OM->Get('Kernel::Output::HTML::Layout');
my $LayoutObject = $Kernel::OM->Create('Kernel::Output::HTML::Layout');
my $FieldRestrictionsObject = $Kernel::OM->Get('Kernel::System::Ticket::FieldRestrictions');
my $TicketObject = $Kernel::OM->Get('Kernel::System::Ticket');
my $DynamicFieldBackendObject = $Kernel::OM->Get('Kernel::System::DynamicField::Backend');
my $LayoutObjectZoom = $Kernel::OM->Get('Kernel::Output::HTML::Layout');
my $LayoutObject = $Kernel::OM->Create('Kernel::Output::HTML::Layout');
my $TicketObject = $Kernel::OM->Get('Kernel::System::Ticket');

# Check needed parameters:
# ProcessEntityID only
Expand Down Expand Up @@ -1246,7 +1238,7 @@ sub _OutputActivityDialog {
InitialRun => 1,
);

%DFPossibleValues = map { $_ => $DynFieldStates{Fields}{PossibleValues} } keys $Self->{DynamicField}->%*;
%DFPossibleValues = map { 'DynamicField_' . $_ => $DynFieldStates{Fields}{$_}{PossibleValues} } keys $Self->{DynamicField}->%*;
%Visibility = $DynFieldStates{Visibility}->%*;
}

Expand Down Expand Up @@ -3247,8 +3239,7 @@ sub _StoreActivityDialog {
}

# get needed objects
my $ProcessObject = $Kernel::OM->Get('Kernel::System::ProcessManagement::Process');
my $ConfigObject = $Kernel::OM->Get('Kernel::Config');
my $ConfigObject = $Kernel::OM->Get('Kernel::Config');

my @Notify;

Expand Down Expand Up @@ -3473,7 +3464,7 @@ sub _StoreActivityDialog {
my $Success;
if ( $Self->{NameToID}{$CurrentField} eq 'Title' ) {

# if there is no title, nothig is needed to be done
# if there is no title, nothing is needed to be done
if (
!defined $TicketParam{'Title'}
|| ( defined $TicketParam{'Title'} && $TicketParam{'Title'} eq '' )
Expand Down