Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

In this Discussion

osTicket v1.10 (stable) and Maintenance Release v1.9.15 are now available! Go get it now

Show "Internal Notes" inline with "Ticket Thread"?

As a former (unhappy) RT user, I am very pleased with osTicket's ease of installation and use.

There's only one real problem: The way I'm using osTicket, a large amount of the interaction is between staff and management, and not so much with the original requester or "end user".

Currently, in a ticket view, it seems that the actions of the staff (changing ticket assignment and making "Internal notes") are displayed in a whole separate area from the main comments and replies (Ticket Thread). And in fact the Internal Notes and Ticket Thread seems to be displayed in reverse order: Internal Notes shows newest at the top, Ticket Thread shows newest at the bottom.

This creates a pretty difficult situation for us, since the user has to scroll back end forth and carefully compare timestamps in order to see the Internal Notes in the right order along with the Thread tickets.

Is there anyway to change this and have all posts, both the Internal Notes posts and the Ticket Thread posts displayed together, inline, in descending order (by timestamp), instead of having 2 separate sections?

Thanks,

JW

Comments

  • This is my biggest issue with OS Ticket, as it does make the time-line of a ticket thread very difficult to follow, and quite often the internal notes containing crucial information are often overlooked, causing embarrassment in front of the customer.

    I found this thread when searching for a mod that changed this behaviour, but haven't managed to find anything.

    It's important enough for me to have a go at writing a mod for this myself, however after looking into it, I suspect my limited PHP skills aren't up to the job. :(

    p.s. I'm also a former RT user.
  • Bump

    Sorry for the bump, but if someone managed to do this, please share!

    Thanks!
  • You can Bump this one all day as far as I'm concerned! :)
  • Show "Internal Notes" inline with "Ticket Thread"

    Here's my quick & uneducated hack, use with caution...

    I edited the staff ticket view, and basically removed the "Internal Notes" thread and instead write all messages, replies and notes in chronological order in the Ticket Thread.

    It goes to osticket/include/staff and replaces the file "viewticket.inc.php" there, so be sure to backup.

    You may want to also update the header colors (table.message th, table.response th, and table.note th) in the style sheet /scp/css/style.css to make the notes stand out from messages in the list.
  • Nice work. I haven't been able to download this just yet (attachment pending approval), but I'll be back later.

    Many thanks, this should make the system far more usable IMHO.
  • nsirola;20251 said:

    Basically I removed the "Internal Notes" thread and instead write all messages, replies and notes in chronological order in the Ticket Thread.
    Wow, this sounds scary! I don't want a customer receiving any internal (confidential) information....
  • darkpepe;20253 said:
    Wow, this sounds scary! I don't want a customer receiving any internal (confidential) information....
    The modified file is in the staff/ directory so it only affects viewing the ticket when logged in as a staff member. The database structure or customer interface is not touched.
  • nsirola,

    Many thanks for this mod, it works perfectly.

    This makes the SCP much easier to follow now, having staff notes in line with customer input and responses.

    I can't understand why OSTicket didn't do this themselves in the first place. Fingers crossed they will roll this into the next version.
  • Can a forum mod please move this thread to the "Mods and Customizations" forum where it belongs now?

    Thanks.
  • nsirola;20251 said:
    Here's my quick & uneducated hack, use with caution...

    I edited the staff ticket view, and basically removed the "Internal Notes" thread and instead write all messages, replies and notes in chronological order in the Ticket Thread.

    It goes to osticket/include/staff and replaces the file "viewticket.inc.php" there, so be sure to backup.

    You may want to also update the header colors (table.message th, table.response th, and table.note th) in the style sheet /scp/css/style.css to make the notes stand out from messages in the list.
    The MOD is ok. 10x.
  • STOP !
    I found a problem It s not ok. In this case simple user can't see staff response for his notes.
    The big select with union must be like this with new column 'row_type':

    $sql=
    '(SELECT 1 as row_type, msg.msg_id, msg.created, msg.message, count(attach_id) as attachments, concat("Customer (",source,")") as source, "M" as msgtype '.
    ' FROM '.TICKET_MESSAGE_TABLE.' msg '.
    ' LEFT JOIN '.TICKET_ATTACHMENT_TABLE.' attach ON msg.ticket_id=attach.ticket_id AND msg.msg_id=attach.ref_id AND ref_type="M" '.
    ' WHERE msg.ticket_id='.db_input($id).
    ' GROUP BY msg.msg_id) '.
    ' UNION '.
    ' (SELECT 2 as row_type, resp.response_id, resp.created, resp.response, count(attach_id) as attachments, resp.staff_name, "R" FROM '.TICKET_RESPONSE_TABLE.' resp '.
    ' LEFT JOIN '.TICKET_ATTACHMENT_TABLE.' attach ON resp.ticket_id=attach.ticket_id AND resp.response_id=attach.ref_id AND ref_type="R" '.
    ' WHERE resp.ticket_id='.db_input($id).
    ' GROUP BY resp.response_id) '.
    ' UNION '.
    ' (SELECT 3 as row_type, note.note_id, note.created, note.note, 0, concat(note.source, " - ", note.title), "N" '.
    ' FROM '.TICKET_NOTE_TABLE.' note WHERE note.ticket_id='.db_input($id).
    ' AND note.title NOT IN ("Ticket Updated", "Ticket Marked Overdue") AND note.title NOT LIKE "%Transfer%" ) '.
    ' ORDER BY created ASC ';
    and in while have to check row_type

    while ($msg_row = db_fetch_array($msgres)) {
    if ($msg_row['row_type'] == 1) {
    $msgid = $msg_row['msg_id'];
    }
  • Can anyone confirm whether this mod is bug-free?
  • I'm having trouble making this mod play nice with the "display images in thread" mod... any advice on making the two work together? I have no idea.

    function getAttachmentStr($refid,$type){ 
    $sql ='SELECT attach_id,file_size,file_name,file_key FROM '.TICKET_ATTACHMENT_TABLE.
    ' WHERE deleted=0 AND ticket_id='.db_input($this->getId()).' AND ref_id='.db_input($refid).' AND ref_type='.db_input($type);
    $res=db_query($sql);
    if($res && db_num_rows($res)){
    while(list($id,$size,$name,$key)=db_fetch_row($res)){
    $hash=MD5($this->getId()*$refid.session_id());
    $size=Format::file_size($size);
    $ext = substr(strrchr($name, '.'), 1);
    $image = (in_array($ext,array('jpg','png','gif'))) ? '<img src=\"/support/attachments/'.$key.'_'.$name.'\" />' : '';
    $attachstr.= \"<a class='Icon file' href='attachment.php?id=$id&ref=$hash' target='_blank'><b>$name</b></a>&nbsp;(<i>$size</i>)&nbsp;&nbsp;\" . $image;
    }
    }
    return ($attachstr);
    }
Sign In or Register to comment.