-
Notifications
You must be signed in to change notification settings - Fork 73
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 #2016: Set default selected state type to pending reminder #2017
base: rel-11_0
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Usually, magic number like 4 should be avoided, but I don't really have a better idea. Approving as the magic number is at least documented in a code comment.
I had the same thought. Only alternative I'm aware of would be to use Selected => 'pending reminder', but I would prefer the id over the name, and as @StefanAbel-OTOBO indicated here, there is no known sane way to delete the state type, so I hope this is an acceptable option. |
Kernel/Modules/AdminState.pm
Outdated
$Param{StateTypeOption} = $LayoutObject->BuildSelection( | ||
Data => { $StateObject->StateTypeList( UserID => 1 ), }, | ||
Name => 'TypeID', | ||
SelectedID => $Param{TypeID}, | ||
SelectedID => $Param{TypeID} || 4, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please use Kernel::System::State->StateTypeLookup() for 'pending reminder' and just set the default ID, if an ID is found.
2660cd6
to
9398871
Compare
9398871
to
b6561b4
Compare
b6561b4
to
fad9061
Compare
Closing #2016