Skip to content

Commit

Permalink
Issue #2797: Allowed zero as valid value for ImportExport attribute s…
Browse files Browse the repository at this point in the history
…election.
  • Loading branch information
stefanhaerter authored and svenoe committed Jan 8, 2024
1 parent 55dfc57 commit 8a4651d
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions Kernel/Output/HTML/ImportExport/LayoutSelection.pm
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# OTOBO is a web-based ticketing system for service organisations.
# --
# Copyright (C) 2001-2020 OTRS AG, https://otrs.com/
# 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 @@ -88,7 +88,9 @@ sub FormInputCreate {

# set default value
$Param{Prefix} ||= '';
$Param{Value} ||= $Param{Item}->{Input}->{ValueDefault};

# zero is a valid value (occurs e.g. with selecting 'No' for Attribute IncludeColumnHeaders)
$Param{Value} //= $Param{Item}->{Input}->{ValueDefault};

if ( $Param{Value} && $Param{Value} =~ m{ ##### }xms ) {
my @Values = split /#####/, $Param{Value};
Expand Down

0 comments on commit 8a4651d

Please sign in to comment.