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

Kernel::System::Calendar::Appointment uses uninitialized Log object #1942

Closed
1 of 2 tasks
bschmalhofer opened this issue Sep 16, 2022 · 3 comments
Closed
1 of 2 tasks
Assignees
Labels
good first issue Good for newcomers
Milestone

Comments

@bschmalhofer
Copy link
Contributor

bschmalhofer commented Sep 16, 2022

In Kernel/System/LinkObject/Appointment.pm the attribute LogObject is used but never initiialized.

TODO:

  • enhance the test script such that the relevant code is called
  • Get the Log object from $Kernel::OM
@bschmalhofer bschmalhofer added the good first issue Good for newcomers label Sep 16, 2022
@bschmalhofer bschmalhofer added this to the OTOBO 10.1.6 milestone Sep 16, 2022
@bschmalhofer bschmalhofer changed the title Kernel::System::Calendar::Appointment used uninitialized Log object Kernel::System::Calendar::Appointment uses uninitialized Log object Sep 16, 2022
@stefanhaerter
Copy link
Contributor

Would it be good practice to replace the two occurrences of $Self->{LogObject} with $Kernel::OM->Get... ? Or would you just add $Self->{LogObject} = $Kernel::OM->Get... ?

@bschmalhofer
Copy link
Contributor Author

@stefanhaerter In this case I would opt for consistency and use $Kernel::OM->Get('Kernel::System::Log')->Log(...);. The same way it is done in the other methods.

@stefanhaerter stefanhaerter self-assigned this Oct 14, 2022
bschmalhofer added a commit that referenced this issue Oct 16, 2022
Issue #1942: Replace LogObject with proper call to ObjectManager
@bschmalhofer
Copy link
Contributor Author

Merged the PR. Closing this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

2 participants