Skip to content
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

Check usage of Kernel::System::SysConfig::SettingUpdate #561

Closed
2 tasks done
bschmalhofer opened this issue Oct 22, 2020 · 1 comment
Closed
2 tasks done

Check usage of Kernel::System::SysConfig::SettingUpdate #561

bschmalhofer opened this issue Oct 22, 2020 · 1 comment
Assignees
Labels
enhancement New feature or request
Milestone

Comments

@bschmalhofer
Copy link
Contributor

bschmalhofer commented Oct 22, 2020

The module Kernel::System::SysConfig is an outlier, in that it return a hash instead of a scalar value. This means that in list context a list of key value pairs is returned. In scalar context the number of entries in the result hash is returned.

Checking for success should be done via the attribute $Result{Success}. But at least in Kernel::Modules::MigrateFromOTRS there is a call to SettingUpdate in scalar context.

TODO:

  • tidy Kernel::System::SysConfig::SettingUpdate()
  • check the usage of Kernel::System::SysConfig::SettingUpdate()
@bschmalhofer bschmalhofer added the enhancement New feature or request label Oct 22, 2020
@bschmalhofer bschmalhofer added this to the OTOBO 10.0 milestone Oct 22, 2020
@bschmalhofer bschmalhofer self-assigned this Oct 22, 2020
bschmalhofer added a commit that referenced this issue Oct 22, 2020
@bschmalhofer
Copy link
Contributor Author

Checked the usage. Fixed some cases where the status was not checked correctly.
Unittests look fine. Closing the issue.

bschmalhofer added a commit that referenced this issue Oct 22, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant