Closed HeldvonKosmos closed 6 months ago
I have solved the problem. Just modify the function watchers() from Line 146 in /app/Models/Ticket.php as follows:
public function watchers(): Attribute
{
return new Attribute(
get: function () {
$users = collect();
$users->push($this->owner);
if ($this->responsible) {
$users->push($this->responsible);
}
$subscribers = TicketSubscriber::where('ticket_id', $this->id)->get();
foreach ($subscribers as $subscriber) {
$users->push($subscriber->user);
}
return $users->unique('id');
}
);
}
Hey there, thank you for the wonderful WebApp. It is the one thing that makes my life much easier at this moment. I have only one problem. The Mails will be send to every user that is in a project. It would be much better to send only to users, that have subscribed to a ticket. Thanks in advance.