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

Add _do_not_compute_takeintoaccount in Common Task #18527

Open
wants to merge 10 commits into
base: 10.0/bugfixes
Choose a base branch
from
Open
Prev Previous commit
Next Next commit
Implement suggestion
  • Loading branch information
Lainow committed Dec 11, 2024
commit 8115b9718372def93873f8ce1816e8be55228596
5 changes: 5 additions & 0 deletions src/CommonITILObject.php
Original file line number Diff line number Diff line change
Expand Up @@ -5210,6 +5210,11 @@ public function updateDateMod($ID, $no_stat_computation = false, $users_id_lastu
$update['users_id_lastupdater'] = $users_id_lastupdater;
}

// set take into account delay stat
if ($no_stat_computation) {
$update['takeintoaccount_delay_stat'] = 0;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IMHO, we should not force the value here. takeintoaccount_delay_stat may have already been defined by a previous action.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Like that it's okay ?

if ($this->fields['takeintoaccount_delay_stat'] == 0) {
    $update['takeintoaccount_delay_stat'] = 0;
}

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am not sure to understand what you are trying to do. Also, the ticket specific case should probably be managed in the Ticker::updateDateMod() override.

}

$DB->update(
$this->getTable(),
$update,
Expand Down
Loading