Hi All,
I've solved this problem like this:
(I used this manual http://osticket.com/forums/showthread.php?t=873(http://osticket.com/forums/showthread.php?t=873))
1) MySQL Database: manually add a field to ost_Ticket
topic varchar(32)
2) class.ticket.php:
Add new variable here:
class Ticket{
var $id;
var $extid;
var $email;
var $status;
var $created;
var $updated;
var $priority;
<STRONG><s>**</s> var $topic; <e>**</e></STRONG>
and here:
$this->created =$row;
$this->updated =$row;
<STRONG><s>**</s> $this->topic =$row; <e>**</e></STRONG>
and here:
//GET
function getId(){
return $this->id;
}
function getExtId(){
return $this->extid;
}
function getTopic(){
return $this->topic;
}
and here:
// Intenal mapping magic...see if we need to overwrite anything
if(isset($var) && !$var) { //Ticket created via web by user
if($var && ($topic= new Topic($var)) && $topic->getId()) {
$deptId=$topic->getDeptId();
$priorityId=$priorityId?$priorityId:$topic->getPriorityId();
$autorespond=$topic->autoRespond();
<STRONG><s>**</s> $topic_txt = $topic->topic;<e>**</e></STRONG>
}
$topic=null;
$source='Web';
}elseif($var && !$var) { //Emailed Tickets
$email= new Email($var);
if($email && $email->getId()){
$deptId=$email->getDeptId();
$autorespond=$email->autoRespond();
$priorityId=$priorityId?$priorityId:$email->getPriorityId();
}
$email=null;
$source='Email';
$topic='';
<STRONG><s>**</s> $topic_txt = '';<e>**</e></STRONG>
}elseif($var){ //Opened by staff.
$deptId=$var;
$source=ucfirst($var);
<STRONG><s>**</s> $topic_txt = '';<e>**</e></STRONG>
}
and finally open view client\viewticket.inc.php and staff\viewticket.inc.php.
I've decided to put topic to the header.
Ticket #<?=$ticket->getExtId()?> <a href="tickets.php?id=<?=$id?>" title="Reload"><span class="Icon refresh"> </span></a>
<?=$ticket->getTopic()?>
Hope this will help somebody.
WBR, Alex Simachov