From dad5c1119765c16800ca4091a75ee423f32a7894 Mon Sep 17 00:00:00 2001 From: Tomolimo Date: Thu, 1 Apr 2021 10:31:00 +0200 Subject: [PATCH] Fixed bug duration task when > 1 month --- inc/processmaker.class.php | 2 +- setup.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/inc/processmaker.class.php b/inc/processmaker.class.php index 67363d1..81a9b11 100644 --- a/inc/processmaker.class.php +++ b/inc/processmaker.class.php @@ -1736,7 +1736,7 @@ class PluginProcessmakerProcessmaker extends CommonDBTM { $input['end'] = $options['end_date']->format("Y-m-d H:i:s"); $input['plan']['begin'] = $input['begin']; $temp = $options['start_date']->diff( $options['end_date'] ); - $input['plan']['_duration'] = $temp->d * DAY_TIMESTAMP + $temp->h * HOUR_TIMESTAMP + $temp->i * MINUTE_TIMESTAMP + $temp->s; + $input['plan']['_duration'] = $temp->days * DAY_TIMESTAMP + $temp->h * HOUR_TIMESTAMP + $temp->i * MINUTE_TIMESTAMP + $temp->s; if ($input['plan']['_duration'] == 0) { $input['plan']['_duration'] = 60; // at least } diff --git a/setup.php b/setup.php index f47ccbf..e3f2861 100644 --- a/setup.php +++ b/setup.php @@ -1,6 +1,6 @@