Skip to content

Commit

Permalink
Issue #2016: Replace hardcoded id with call to StateTypeLookup.
Browse files Browse the repository at this point in the history
  • Loading branch information
stefanhaerter committed Jan 26, 2024
1 parent f0740e2 commit b6561b4
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion Kernel/Modules/AdminState.pm
Original file line number Diff line number Diff line change
Expand Up @@ -352,11 +352,16 @@ sub _Edit {
SelectedID => $Param{ValidID} || $ValidListReverse{valid},
Class => 'Modernize Validate_Required ' . ( $Param{Errors}->{'ValidIDInvalid'} || '' ),
);

my $SelectedStateID = $StateObject->StateLookup(
StateType => 'pending reminder',
) || '';

# default selected state type is 'pending reminder'
$Param{StateTypeOption} = $LayoutObject->BuildSelection(
Data => { $StateObject->StateTypeList( UserID => 1 ), },
Name => 'TypeID',
SelectedID => $Param{TypeID} || 4,
SelectedID => $Param{TypeID} || $SelectedStateID,
Class => 'Modernize Validate_Required ' . ( $Param{Errors}->{'TypeIDInvalid'} || '' ),
);
$LayoutObject->Block(
Expand Down

0 comments on commit b6561b4

Please sign in to comment.