Commit 38ed2796 authored by Arnaud Pauget's avatar Arnaud Pauget
Browse files

fix(15580) : set next execution date and last execution date even if the task is on error

parent 012719ae
Pipeline #10462 failed with stages
in 49 seconds
......@@ -196,15 +196,17 @@ class scheduling
$status = false;
\laabs::notify(LAABS_BUSINESS_EXCEPTION, $info);
}
}
$scheduling->lastExecution = \laabs::newDateTime();
$scheduling->lastExecution->setTimezone(new \DateTimeZone('UTC'));
$frequency = explode(";", $scheduling->frequency);
$scheduling->nextExecution = $this->nextExecution($frequency);
if ($status) {
$scheduling->lastExecution = \laabs::newDateTime();
$scheduling->lastExecution->setTimezone(new \DateTimeZone('UTC'));
$scheduling->status = "scheduled";
$frequency = explode(";", $scheduling->frequency);
$scheduling->nextExecution = $this->nextExecution($frequency);
} else {
$scheduling->status = "error";
}
......
......@@ -505,9 +505,9 @@
success : function (response) {
gritter.show(response.message, response.status, response.errors);
a.find('.status').bootstrapToggle('on');
a.find('.nextExecution').text(response.object.nextExecution);
a.find('.lastExecution').text(response.object.lastExecution);
if (response.status == true) {
a.find('.nextExecution').text(response.object.nextExecution);
a.find('.lastExecution').text(response.object.lastExecution);
a.find("[name=displayError]").hide();
} else {
a.find("[name=displayError]").show();
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment