mirror of
https://github.com/CachetHQ/Cachet.git
synced 2025-01-17 05:28:18 +01:00
Update original incident with new update status
This commit is contained in:
parent
247c1565a4
commit
d5d92f5a3d
@ -12,6 +12,7 @@
|
|||||||
namespace CachetHQ\Cachet\Bus\Handlers\Commands\IncidentUpdate;
|
namespace CachetHQ\Cachet\Bus\Handlers\Commands\IncidentUpdate;
|
||||||
|
|
||||||
use CachetHQ\Cachet\Bus\Commands\IncidentUpdate\ReportIncidentUpdateCommand;
|
use CachetHQ\Cachet\Bus\Commands\IncidentUpdate\ReportIncidentUpdateCommand;
|
||||||
|
use CachetHQ\Cachet\Bus\Commands\Incident\UpdateIncidentCommand;
|
||||||
use CachetHQ\Cachet\Bus\Events\IncidentUpdate\IncidentUpdateWasReportedEvent;
|
use CachetHQ\Cachet\Bus\Events\IncidentUpdate\IncidentUpdateWasReportedEvent;
|
||||||
use CachetHQ\Cachet\Models\IncidentUpdate;
|
use CachetHQ\Cachet\Models\IncidentUpdate;
|
||||||
|
|
||||||
@ -41,6 +42,21 @@ class ReportIncidentUpdateCommandHandler
|
|||||||
// Create the incident update.
|
// Create the incident update.
|
||||||
$update = IncidentUpdate::create($data);
|
$update = IncidentUpdate::create($data);
|
||||||
|
|
||||||
|
// Update the original incident with the new status.
|
||||||
|
dispatch(new UpdateIncidentCommand(
|
||||||
|
$incident,
|
||||||
|
null,
|
||||||
|
$command->status,
|
||||||
|
null,
|
||||||
|
null,
|
||||||
|
null,
|
||||||
|
null,
|
||||||
|
null,
|
||||||
|
null,
|
||||||
|
null,
|
||||||
|
null
|
||||||
|
));
|
||||||
|
|
||||||
event(new IncidentUpdateWasReportedEvent($update));
|
event(new IncidentUpdateWasReportedEvent($update));
|
||||||
|
|
||||||
return $update;
|
return $update;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user