add acknowledgement link to table

This commit is contained in:
Jon Goldberg 2020-07-31 17:46:26 -04:00
parent 9c0a5603d3
commit 98d8e3c837
No known key found for this signature in database
GPG Key ID: C2D2247364F9DB13

View File

@ -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";
}
}