-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Feature: improve logging of user assignment and deassigment #21202
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
base: 11.0/bugfixes
Are you sure you want to change the base?
Feature: improve logging of user assignment and deassigment #21202
Conversation
It is now done in CommonITILActor isntead of teh child classes. This allows it to work for tickets, changes and problems
If there are existing tests testing the produced logs entries, please indicate their class/method name, so we can check them. Otherwise, you should add tests for each impacted class and you can see how it is done in the |
| } | ||
|
|
||
| // Values from CommonITILObject::getSearchOptionsActors() | ||
| if (static::$itemtype_2 === 'User') { |
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.
| if (static::$itemtype_2 === 'User') { | |
| if (static::$itemtype_2 === User::class) { |
| case CommonITILActor::ASSIGN: | ||
| return 5; | ||
| } | ||
| } elseif (static::$itemtype_2 === 'Group') { |
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.
| } elseif (static::$itemtype_2 === 'Group') { | |
| } elseif (static::$itemtype_2 === Group::class) { |
| case CommonITILActor::ASSIGN: | ||
| return 8; | ||
| } | ||
| } elseif (static::$itemtype_2 === 'Supplier') { |
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.
| } elseif (static::$itemtype_2 === 'Supplier') { | |
| } elseif (static::$itemtype_2 === Supplier::class) { |
| } | ||
|
|
||
| $current_log_option = $this -> _force_log_option; | ||
| $this -> _force_log_option = $this -> get_force_log_option(); |
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.
| $this -> _force_log_option = $this -> get_force_log_option(); | |
| $this->_force_log_option = $this->get_force_log_option(); |
| $current_log_option = $this -> _force_log_option; | ||
| $this -> _force_log_option = $this -> get_force_log_option(); | ||
| parent::post_addItem(); | ||
| $this -> _force_log_option = $current_log_option; |
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.
| $this -> _force_log_option = $current_log_option; | |
| $this->_force_log_option = $current_log_option; |
| $current_log_option = $this -> _force_log_option; | ||
| $this -> _force_log_option = $this -> get_force_log_option(); | ||
| parent::post_deleteFromDB(); | ||
| $this -> _force_log_option = $current_log_option; |
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.
| $this -> _force_log_option = $current_log_option; | |
| $this->_force_log_option = $current_log_option; |
| $current_log_option = $this -> _force_log_option; | ||
| $this -> _force_log_option = $this -> get_force_log_option(); |
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.
| $current_log_option = $this -> _force_log_option; | |
| $this -> _force_log_option = $this -> get_force_log_option(); | |
| $current_log_option = $this->_force_log_option; | |
| $this->_force_log_option = $this->get_force_log_option(); |
trasher
left a comment
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.
After a quick look, this seems globally OK
Checklist before requesting a review
Please delete options that are not relevant.
The added code is covered by existing tests. If you need more tests for this Feature could you advise where to place them ?
Description
This pull requests does two things:
It adds recording to which position an Actor is assigned for problems and changes.
It adds recording when a user is removed from a position for tickets, problems and changes.