Fix #12
This commit is contained in:
parent
bd7d44c1db
commit
1a8016ae13
2 changed files with 2 additions and 4 deletions
|
|
@ -20,8 +20,7 @@ class AutoCloseOldTickets
|
|||
$limitDays = 15;
|
||||
$message = 'En l\'absence d\'activitée depuis 15 jours ce ticket est automatiquement clos et archivé.';
|
||||
$tickets = Ticket::where(function ($q) {
|
||||
$q->where('status', TicketStatus::production())
|
||||
->orWhere('status', TicketStatus::processed());
|
||||
$q->where('status', TicketStatus::production());
|
||||
})->whereDate('updated_at', '<=', Carbon::now()->subDays($limitDays))
|
||||
->whereDoesntHave('messages', function ($q) use ($limitDays) {
|
||||
$q->whereDate('updated_at', '>', Carbon::now()->subDays($limitDays));
|
||||
|
|
|
|||
|
|
@ -23,8 +23,7 @@ class WarnBeforeAutoCloseTicket
|
|||
// phpcs:ignore Generic.Files.LineLength.TooLong
|
||||
$messageToUser = 'En l\'absence d\'activitée, ou de réponse de votre part ce ticket sera automatiquement clos et archivé dans %s jours.';
|
||||
$tickets = Ticket::where(function ($q) {
|
||||
$q->where('status', TicketStatus::production())
|
||||
->orWhere('status', TicketStatus::processed());
|
||||
$q->where('status', TicketStatus::production());
|
||||
})->whereDate('updated_at', '<=', Carbon::now()->subDays($warningDays))
|
||||
->whereDoesntHave('messages', function ($q) use ($warningDays) {
|
||||
$q->whereDate('updated_at', '>', Carbon::now()->subDays($warningDays));
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue