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

[MOD] Change page title to Ticket # + Subject when ticket open. (Staff)

Hello all,

This is a very simple change, but has been very effective for our staff when they have several tickets open at one time. Currently if a user opens several tickets the tabs in IE, Firefox or Chrome only display the standard page title and it makes it difficult to determine which tab is which ticket.

This small modification will check if the page being displayed is a ticket and will display the Ticket # and Subject as the page title. If there is no ticket open it will default to the standard page title.

Step 1
Open include\staff\header.inc.php

Find
<title>YOUR CUSTOM PAGE TITLE</title>


This may still be the default:

<title>osTicket :: Staff Control Panel</title>


Replace with:
<?php
if($ticket && is_object($ticket)){ ?>
<title>Ticket #<?=$ticket->getExtId()?> - <?=Format::htmlchars($ticket->getSubject())?></title>
<?}else{?>
<title>YOUR CUSTOM PAGE TITLE</title>
<?}?>


That's it. Now when you open a ticket the page title with be the Ticket # + Subject.

Of course you can change the information display to whatever you like by replace the get******* commands with others such as:

Status: getStatus
Priority: getPriority
Dept Name: getDeptName

Assigned Staff:
<?=$staff?Format::htmlchars($staff->getName()):'- unassigned -'?>


etc etc.

There are other, which you can find in \include\staff\viewticket.inc.php if needed.

Hope this comes in handy to somebody. And remember to back up your code before attempting!

Comments

This discussion has been closed.