Mengurutkan Tiket Berdasarkan LastMessage untuk Klien pada My Tickets di osTicket v1.6 RC5

Hari ini saya menerima sebuah permintaan mengenai bagaimana cara mengurutkan berdasarkan field LastMessage di halaman My Tickets dari osTicket v1.6 RC5. Berikut ini cuplikan dari topik terkait:

Hello here is my problem.
I want to order the tickets in Tickets -> My Tickets menu in order to have le last tickets in which the client send another message on the top of the list instead of a list ordered by date of creation.

I’m trying to change that because my custumer service employees usually have more than 300 mails opened and its better if the last updated tickets are on the top instead of everywhere on the list.So the will be able to answer easier and faster .

Thanks for the help and sorry for my english

i’m using 1.6 RC5 version

Lalu saya berhasil membuat modifikasi untuk mewujudkan hal ini menjadi kenyataan. Hasil akhir yang saya buat adalah, sekarang terdapat dua kolom baru di tabel yang menampilkan daftar tiket. Kedua kolom tersebut adalah: Last Response and Last Message, dan secara default, tabel akan diurutkan berdasarkan kolom Last Message. Anda dapat mengurutkan tabel berdasarkan kedua kolom atau field baru tadi.

  1. Buka file \include\client\tickets.inc.php, lalu cari kode ini:

    28
    
    $sortOptions=array('date'=>'ticket.created','ID'=>'ticketID','pri'=>'priority_id','dept'=>'dept_name');

    kemudian timpa dengan kode berikut:

    28
    
    $sortOptions=array('date'=>'ticket.created','ID'=>'ticketID','lastresp'=>'lastresponse','lastmsg'=>'lastmessage','pri'=>'priority_id','dept'=>'dept_name');
  2. Cari lagi kode yang ini:

    42
    
    $order_by =$order_by?$order_by:'ticket.created';

    lalu timpa dengan kode berikut:

    42
    
    $order_by =$order_by?$order_by:'ticket.lastmessage';
  3. Cari lagi kode yang ini:

    47
    48
    
    $qselect = 'SELECT ticket.ticket_id,ticket.ticketID,ticket.dept_id,isanswered,ispublic,subject,name,email '.
               ',dept_name,status,source,priority_id ,ticket.created ';

    lalu timpa dengan kode berikut:

    47
    48
    
    $qselect = 'SELECT ticket.ticket_id,ticket.ticketID,ticket.dept_id,isanswered,ispublic,subject,name,email '.
               ',dept_name,status,source,priority_id, ticket.created, ticket.lastresponse, ticket.lastmessage ';
  4. Cari lagi kode yang ini:

    92
    93
    
    	        <th width="100">
                    <a href="view.php?sort=date&order=<?=$negorder?><?=$qstr?>" title="Sort By Date <?=$negorder?>">Create Date</a></th>

    lalu timpa dengan kode yang ini:

    92
    93
    94
    95
    96
    97
    
    	        <th width="100">
                    <a href="view.php?sort=date&order=<?=$negorder?><?=$qstr?>" title="Sort By Date <?=$negorder?>">Create Date</a></th>
                    <th>
                    <a href="view.php?sort=lastresp&order=<?=$negorder?><?=$qstr?>" title="Sort by Last Response <?=$negorder?>">Last Response</a></th>
                    <th>
                    <a href="view.php?sort=lastmsg&order=<?=$negorder?><?=$qstr?>" title="Sort by Last Message <?=$negorder?>">Last Message</a></th>
  5. Terakhir, cari lagi kode yang ini:

    118
    
                    <td nowrap>&nbsp;<?=Format::db_date($row['created'])?></td>

    dan timpa dengan kode berikut ini:

    118
    119
    120
    
                    <td nowrap>&nbsp;<?=Format::db_date($row['created'])?></td>
                    <td nowrap>&nbsp;<?=Format::db_date($row['lastresponse'])?></td>
                    <td nowrap>&nbsp;<?=Format::db_date($row['lastmessage'])?></td>

Semoga dapat membantu.

Share

393 kali dibacaCetak Artikel Ini Cetak Artikel Ini

Komentar

  1. john mengatakan:

    I tried to install this mod and it crash the site, I did notice that when I was moding it I have somethings that are different. I just wanted to add a last updates tab to the tickets.

  2. Masino Sinaga mengatakan:

    I have tested this modification before, and this worked fine only for client-side.

    If you have already done some modification by yourself, please make sure not to replace all of your modification code with the modification I made.

    You have to ensure the part that should be modified according the change that I made. Sorry for not to mention “backup first before doing this modification”, since I assume you should always do that.

  3. john mengatakan:

    I did but I tried to install it on the staff side that is the problem then, is there any way to add just a last updated column to the staff side?

  4. Masino Sinaga mengatakan:

    I have already created the same modification for staff side. Please follow this link: Order Tickets by LastMessage for Staff in My Tickets Page of osTicket v1.6 RC5. Hopefully this will help you.

Utarakan pikiran Anda

*


*