Add admin backend to edit incident and change status
Also fixes Status Board display on homepage to show correct status on each day. It was previously reusing the currnent status for all previous days on which the incidents were open.
This commit is contained in:
@@ -10,9 +10,21 @@ class StatusBoard_IncidentStatus extends StatusBoard_DatabaseObject {
|
||||
protected $_db_description;
|
||||
protected $_db_ctime;
|
||||
|
||||
protected function all_for_incident(StatusBoard_Incident $incident) {
|
||||
public function all_for_incident(StatusBoard_Incident $incident) {
|
||||
return static::all_for('incident', $incident->id);
|
||||
}
|
||||
|
||||
public function newForIncident(StatusBoard_Incident $incident, $status, $description) {
|
||||
$new_status = new self();
|
||||
$new_status->incident = $incident->id;
|
||||
$new_status->status = $status;
|
||||
$new_status->description = $description;
|
||||
$new_status->ctime = time();
|
||||
|
||||
$new_status->create();
|
||||
|
||||
return $new_status;
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
Reference in New Issue
Block a user