add default comments when change owner or status on events

This commit is contained in:
marcos.alconada 2019-10-07 11:15:25 +02:00
parent f1d20d56e7
commit a9e8b1113e
3 changed files with 8 additions and 8 deletions

View File

@ -11771,7 +11771,7 @@ function api_set_validate_event_by_id($id, $trash1=null, $trash2=null, $returnTy
} else {
$ack_utimestamp = time();
events_comment($id, '', 'Change status to validated');
events_comment($id, 'Event validated', 'Change status to validated');
$values = [
'ack_utimestamp' => $ack_utimestamp,

View File

@ -1765,7 +1765,7 @@ function events_change_status(
events_comment(
$id_event,
'',
'Event validated',
'Change status to '.$status_string,
$meta,
$history
@ -1857,7 +1857,7 @@ function events_change_owner(
if ($force) {
events_comment(
$id_event,
'',
'Change owner to '.$new_owner.'',
'Change owner to '.$new_owner,
$meta,
$history

View File

@ -1222,9 +1222,8 @@ sub pandora_execute_action ($$$$$$$$$;$) {
# Check for _module_graph_Xh_ macros
# Check for _module_graph_Xh_ macros and _module_graphth_Xh_
my $module_graph_list = {};
my $macro_regexp = "_modulegraph_(\\d+)h_";
my $macro_regexp2 = "_modulegraphth_(\\d+)h_";
my $macro_regexp = "_modulegraph_24h_";
my $macro_regexp2 = "_modulegraphth_24h_";
# API connection
my $ua = new LWP::UserAgent;
eval {
@ -1260,11 +1259,12 @@ sub pandora_execute_action ($$$$$$$$$;$) {
}
$params->{"other_mode"} = 'url_encode_separator_%7C';
if (! exists($module_graph_list->{$cid}) && defined $url) {
# Get the module graph image in base 64
my $response = $ua->post($url, $params);
if ($response->is_success) {
$module_graph_list->{$cid} = $response->decoded_content();