Skip to content

Commit

Permalink
Issue #2804: Adapted BaseEntity value structure for usage in sets.
Browse files Browse the repository at this point in the history
  • Loading branch information
stefanhaerter committed Jan 10, 2024
1 parent c15efb4 commit 03a4156
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions Kernel/System/DynamicField/Driver/BaseEntity.pm
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# --
# OTOBO is a web-based ticketing system for service organisations.
# --
# Copyright (C) 2019-2023 Rother OSS GmbH, https://otobo.de/
# Copyright (C) 2019-2024 Rother OSS GmbH, https://otobo.de/
# --
# This program is free software: you can redistribute it and/or modify it under
# the terms of the GNU General Public License as published by the Free Software
Expand Down Expand Up @@ -124,10 +124,10 @@ sub ValueSet {
);
}

my $Value = $Param{DynamicFieldConfig}{Config}{MultiValue}
# in MultiValue and Set case, the value is needed as array ref for creating the value structure correctly
my $Value = ( $Param{DynamicFieldConfig}{Config}{MultiValue} || $Param{Set} )
? $Param{Value}
: $Param{Set} ? [ map { $_->[0] } $Param{Value}->@* ]
: $Param{Value}->[0];
: $Param{Value}->[0];

my $DBValue = $Self->ValueStructureToDB(
Value => $Value,
Expand Down

0 comments on commit 03a4156

Please sign in to comment.