Hi There,
I'm trying to do a small mod where on the "edit ticket" screen, if an employee changes the due date, they can (or must) include a reason.
I've tried adding a column and index to my ost_ticket table called duedate_reason.
I also changed the following of editticket.inc in support/include/staff
if($_POST && $errors){
$info=Format:($_POST);
}else{
$info=array('email'=>$ticket->getEmail(),
'name' =>$ticket->getName(),
'phone'=>$ticket->getPhone(),
'phone_ext'=>$ticket->getPhoneExt(),
'tasks'=>$ticket->getTasks(),
'pri'=>$ticket->getPriorityId(),
'topicId'=>$ticket->getTopicId(),
'topic'=>$ticket->getHelpTopic(),
'subject' =>$ticket->getSubject(),
'duedate' =>$ticket->getDueDate()?(Format:('m/d/Y',Misc:($ticket->getDueDate()))):'',
'time'=>$ticket->getDueDate()?(Format:('G',Misc:($ticket->getDueDate()))):'',
<STRONG><s>**</s> 'duedate_reason' =>$ticket->getDuedate(),<e>**</e></STRONG>
);
(note above that if i change this to getDuedate_reason(),, it won't show the ticket (errors). If I leave it at getDuedate(), it shows the date in a field (i.e. it shows calendar button

<input id="duedate" name="duedate" value="<?=Format:($info)?>"
onclick="event.cancelBubble=true;calendar(this);" autocomplete=OFF>
<a href="#" onclick="event.cancelBubble=true;calendar(getObj('duedate')); return false;"><img src='images/cal.png'border=0 alt=""></a>
<?php
$min=$hr=null;
if($info)
list($hr,$min)=explode(':',$info);
echo Misc:($hr,$min,'time');
?>
<font class="error"> <?=$errors?></font>
<STRONG><s>**</s> <input type="text" name="duedate_reason" size="50" value="<?=$info?>"><e>**</e></STRONG> <font class="error"> <?=$errors?></font></td>
The issue i'm having is even if i've created a "duedate_reason" index or column in my Mysql database under ost_ticket, when I change the array to 'duedate_reason' =>$ticket->getDuedate_reason(), it just goes blank (errors). If I leave it as "getduedate", it works, but shows the date and doesn't save when someone edits the ticket and saves. What am I doing wrong!?