From 98d8e3c837acf54bca312937cd4dbfd4954e8b1b Mon Sep 17 00:00:00 2001 From: Jon Goldberg Date: Fri, 31 Jul 2020 17:46:26 -0400 Subject: [PATCH] add acknowledgement link to table --- oncall.php | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/oncall.php b/oncall.php index 2c8cfee..d77a5a6 100644 --- a/oncall.php +++ b/oncall.php @@ -141,13 +141,19 @@ class oncall { //Add header row $table .= "\n### $label\n"; - $table .= "| Issue | Project | Author | Subject | Minutes Elapsed |\n| :----- | :------- | :----- | :-------| ----: |\n"; + $table .= "| Issue | Project | Author | Subject | Minutes Elapsed | Acknowledge |\n| :----- | :------- | :----- | :-------| ----: | ----: |\n"; foreach ($queryResult as $item) { $table .= "| [{$item['id']}](https://hq.megaphonetech.com/issues/{$item['id']}) "; $table .= "| {$item['project']['name']} "; $table .= "| {$item['author']['name']} "; $table .= "| {$item['subject']} "; $table .= "| {$item['minutes']} "; + if ($label == 'New Maintenance Tickets') { + $table .= "| [Do Not Alert](https://oncall.megaphonetech.com/update_redmine.php?action=do_not_alert&issue={$item['id']}) "; + } + else { + $table .= "| "; + } $table .= "|\n"; } }