Skip to content

Commit ed147ef

Browse files
ccaillybtry
authored andcommitted
fix: handle negative due date for service levels
1 parent 17c0358 commit ed147ef

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

inc/abstractitiltarget.class.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1424,7 +1424,10 @@ protected function setTargetDueDate($data, PluginFormcreatorFormAnswer $formansw
14241424
$period = "month";
14251425
break;
14261426
}
1427-
$str = "+" . $this->fields['due_date_value'] . " $period";
1427+
$str = $this->fields['due_date_value'] . " $period";
1428+
if ($str[0] !== '-') {
1429+
$str = '+' . $str;
1430+
}
14281431

14291432
switch ($this->fields['due_date_rule']) {
14301433
case self::DUE_DATE_RULE_ANSWER:

0 commit comments

Comments
 (0)