I wish new unread tickets to be enunciated on the client's view. I will be using the api to obtain the tickets, and will be able to get what ever data is currently available. I do not wish to modify the database structure to add some "readByClient" column, and am hoping this information is already being stored in the database.
Any recommendations on how to accomplish this? Using the existing application for inspiration, I see how include/client/tickets.inc.php:236
bolds them if they are answered and open. Unfortunately, if the user views the ticket but doesn't respond, they remain bold.
Would this be the best way to inform the user that they should view a ticket or might there be better options?
Thank you
$ticketNumber=$T['number'];
if($T['isanswered'] && !strcasecmp($T['status__state'], 'open')) {
$subject="
<b>$subject</b>";
$ticketNumber="
<b>$ticketNumber</b>";
}
Out of the box end user view shows tickets which admin responded to as bold
<!DOCTYPE html>
<html lang="en_US">
<body>
<div id="container">
<div id="content">
<table id="ticketTable" width="800" border="0" cellspacing="0" cellpadding="0">
<tbody>
<tr id="131">
<td>
<a class="Icon webTicket" title="rm.reed@comcast.net" href="tickets.php?id=131">975654</a>
</td>
<td>11/20/18</td>
<td>Open</td>
<td>
<div style="max-height: 1.2em; max-width: 320px;" class="link truncate" href="tickets.php?id=131">Ticket created and viewed by client​</div>
</td>
<td>
<span class="truncate">Support</span>
</td>
</tr>
<tr id="130">
<td>
<a class="Icon webTicket" title="rm.reed@comcast.net" href="tickets.php?id=130">632768</a>
</td>
<td>11/20/18</td>
<td>Open</td>
<td>
<div style="max-height: 1.2em; max-width: 320px;" class="link truncate" href="tickets.php?id=130">Ticket created and responded to by client​</div>
</td>
<td>
<span class="truncate">Support</span>
</td>
</tr>
<tr id="129">
<td>
<a class="Icon webTicket" title="rm.reed@comcast.net" href="tickets.php?id=129">865306</a>
</td>
<td>11/20/18</td>
<td>Open</td>
<td>
<div style="max-height: 1.2em; max-width: 320px;" class="link truncate" href="tickets.php?id=129">Ticket created and responded to by admin/client</div>
</td>
<td>
<span class="truncate">Support</span>
</td>
</tr>
<tr id="128">
<td>
<a class="Icon webTicket" title="rm.reed@comcast.net" href="tickets.php?id=128">
<b>367924</b>
</a>
</td>
<td>11/20/18</td>
<td>Open</td>
<td>
<div style="max-height: 1.2em; max-width: 320px;" class="link truncate" href="tickets.php?id=128">
<b>Ticket created and responded to by admin</b>
</div>
</td>
<td>
<span class="truncate">Support</span>
</td>
</tr>
<tr id="127">
<td>
<a class="Icon webTicket" title="rm.reed@comcast.net" href="tickets.php?id=127">392178</a>
</td>
<td>11/20/18</td>
<td>Open</td>
<td>
<div style="max-height: 1.2em; max-width: 320px;" class="link truncate" href="tickets.php?id=127">Ticket created and viewed by admin</div>
</td>
<td>
<span class="truncate">Support</span>
</td>
</tr>
<tr id="126">
<td>
<a class="Icon webTicket" title="rm.reed@comcast.net" href="tickets.php?id=126">779485</a>
</td>
<td>11/20/18</td>
<td>Open</td>
<td>
<div style="max-height: 1.2em; max-width: 320px;" class="link truncate" href="tickets.php?id=126">Ticket created</div>
</td>
<td>
<span class="truncate">Support</span>
</td>
</tr>
</tbody>
</table>
</div>
</div>
</body>
</html>