Skip to content

Commit

Permalink
Issue #1449: Details Dialog fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
stefanhaerter committed Feb 23, 2022
1 parent af388f7 commit b99f555
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
10 changes: 8 additions & 2 deletions Kernel/Modules/CustomerDynamicFieldDBDetails.pm
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ sub Run {
my $LayoutObject = $Kernel::OM->Get('Kernel::Output::HTML::Layout');

# get params
for my $Item (qw(DynamicFieldName ID)) {
for my $Item (qw(DynamicFieldName ID ActivityDialogID)) {
$Param{$Item} = $Kernel::OM->Get('Kernel::System::Web::Request')->GetParam( Param => $Item );
}

Expand All @@ -52,7 +52,12 @@ sub Run {
}

# get the pure DynamicField name without prefix
my $DynamicFieldName = substr( $Param{DynamicFieldName}, 13 );
my $DynamicFieldNameLong = substr( $Param{DynamicFieldName}, 13 );

my $DynamicFieldName = $DynamicFieldNameLong;
if ( defined $Param{ActivityDialogID} && $Param{ActivityDialogID} ) {
$DynamicFieldName = substr($DynamicFieldName, 0, index( $DynamicFieldName, '_' . $Param{ActivityDialogID} ) );
}

# get the dynamic field value for the current ticket
my $DynamicFieldConfig = $Kernel::OM->Get('Kernel::System::DynamicField')->DynamicFieldGet(
Expand All @@ -65,6 +70,7 @@ sub Run {
DynamicFieldConfig => $DynamicFieldConfig,
},
);

my $DynamicFieldDBObject = $Kernel::OM->Get('Kernel::System::DynamicFieldDB');

# perform the search based on the given dynamic field config
Expand Down
3 changes: 1 addition & 2 deletions var/httpd/htdocs/js/Core.Agent.DynamicFieldDBSearch.js
Original file line number Diff line number Diff line change
Expand Up @@ -106,11 +106,10 @@ Core.Agent.DynamicFieldDBSearch = (function(TargetNS) {
ActivityDialogID = '';
}


// detect the frontend interface we currently use
if (Core.Config.Get('CGIHandle').indexOf('customer') > -1) {
FrontendInterface = 'CustomerDynamicFieldDBDetails';
SearchIFrameURL = Core.Config.Get('CGIHandle') + '?Action=' + FrontendInterface + ';DynamicFieldName=' + Field + ';ID=' + IdentifierKey;
SearchIFrameURL = Core.Config.Get('CGIHandle') + '?Action=' + FrontendInterface + ';DynamicFieldName=' + Field + ';ID=' + IdentifierKey + ';ActivityDialogID=' + ActivityDialogID;
SearchIFrameURL += SerializeData(Core.App.GetSessionInformation());
SearchIFrame = '<iframe width="700px" height="500px" class="TextOption Customer" src="' + SearchIFrameURL + '"></iframe>';
}
Expand Down

0 comments on commit b99f555

Please sign in to comment.