Bug-fix-patch-16

Starting count for bug patch so numbered this pacth as 16 (I hope we've
commit atleast 15 bug fixes till now)
Solved bugs:
*While replying on a ticket as an agent subject of a mail is getting
changed which results in new mail thread creation in emails.
*Ticket title sometimes get replaced by ''(an empty string) because
sometimes it fetches last created thread as first row and it my not have
the subject/title. So tried to fetch only first row which contains
subjetc of the tickets.
This commit is contained in:
Manish Verma
2016-11-04 14:27:56 +05:30
parent 57efc24003
commit 8eb78ef348
2 changed files with 3 additions and 3 deletions

View File

@@ -566,7 +566,7 @@ class TicketController extends Controller
$attachment_files = null;
}
$thread = Ticket_Thread::where('ticket_id', '=', $ticket_id)->first();
$thread = Ticket_Thread::where('ticket_id', '=', $ticket_id)->orderBy('id')->first();
$ticket_subject = $thread->title;
$user_id = $tickets->user_id;
$user = User::where('id', '=', $user_id)->first();
@@ -2477,7 +2477,7 @@ class TicketController extends Controller
return "<input type='checkbox' name='select_all[]' id='".$ticket->id."' onclick='someFunction(this.id)' class='selectval icheckbox_flat-blue' value='".$ticket->id."'></input>";
})
->addColumn('subject', function ($ticket) {
$subject = Ticket_Thread::where('ticket_id', '=', $ticket->id)->first();
$subject = Ticket_Thread::where('ticket_id', '=', $ticket->id)->orderBy('id')->first();
if (isset($subject->title)) {
$string = str_limit($subject->getSubject(), 20);
} else {