Merge branch 'ent-5259-Cambiar-estado-In-process-de-evento-no-añade-comentario' into 'develop'

Ent 5259 cambiar estado in process de evento no añade comentario

See merge request artica/pandorafms!3009
This commit is contained in:
Daniel Rodriguez 2020-01-14 08:36:43 +01:00
commit 587e53dbd0
1 changed files with 31 additions and 1 deletions

View File

@ -624,7 +624,37 @@ function events_update_status($id_evento, $status, $filter=null, $history=false)
break;
}
return db_process_sql($update_sql);
$result = db_process_sql($update_sql);
if ($result) {
switch ($status) {
case EVENT_STATUS_NEW:
$status_string = 'New';
break;
case EVENT_STATUS_VALIDATED:
$status_string = 'Validated';
break;
case EVENT_STATUS_INPROCESS:
$status_string = 'In process';
break;
default:
$status_string = '';
break;
}
events_comment(
$id_evento,
'',
'Change status to '.$status_string,
is_metaconsole() ? true : false,
$history
);
}
return $result;
}