Fixed status when creating a ticket
This commit is contained in:
parent
1c361f504c
commit
16b2016c0e
1 changed files with 2 additions and 2 deletions
|
|
@ -63,9 +63,9 @@ class Ticket extends Model
|
|||
protected static function booted()
|
||||
{
|
||||
static::creating(function (Ticket $ticket) {
|
||||
// If bug force the ticket status on takenInAccount. All the others are estimateTodo.
|
||||
// If bug force the ticket status on new. All the others are estimateTodo.
|
||||
if ($ticket->type->equals(TicketType::bug())) {
|
||||
$ticket->status = TicketStatus::takenInAccount();
|
||||
$ticket->status = TicketStatus::new();
|
||||
} else {
|
||||
$ticket->status = TicketStatus::estimateTodo();
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue