Hello,could you please help me to find a solution for the following idea?I want to produce a ticket number like xxxWARDDMMYYMMHH(for example: GERWAR2304160945 -> 23.04.2016 at 09 o'clock)xxx = Chars from a customized form field, which are typed by the customerWAR = fixed charsD = daysM = monthY = yearMMHH = TimeThe current date and time should be filled in automatically.Until now, I found out, that I have to change the source code. Is file class.ticket.php in /include/ around line number 2500 the right place or do I have to change something somewhere different?Thank you very much in advance! :)best regards

3 months later

solved (version 1.9.14), here is my solution for custom TicketNumbers, I only do not know at the moment, if some errors would occur because of these changes, but I saw no dependencies of the ticketnumber. Please tell me, if you know, that there occur some errors by completely customised ticketnumbers:- Create Ticket with custom

Ticketnumber without Errors:

/include/staff/ticket-open.inc.php approximately line 115:

<!--

//////////////////////////////////////////////        //own part

-->

        <tr>

            <td width="160"

class="required">

                <?php echo __('Ticket

Number');?>:

            </td>

            <td>

              <input type="text"

name="ticket_number">

            </td>

        </tr>

<!--

//////////////////////////////////////////////        //end of the own part

-->

And /include/class.ticket.php

approximately line 2804:

//We are

ready son...hold on to the rails.

//$number

= $topic ? $topic->getNewTicketNumber() : $cfg->getNewTicketNumber();

$number =

$vars;

- Edit Ticket with custom

Ticketnumber without Errors:

 

/include/staff/ticket-edit.inc.php

approximately line 59:

 

<!--

//////////////////////////////////////////////        //own part

-->

        <tr>

            <td width="160"

class="required">

                <?php echo __('Ticket

Number');?>:

            </td>

            <td> 

                <input type="text"

name="ticket_number">

            </td>

        </tr>

<!--

//////////////////////////////////////////////        //end of the own part

-->

 

And /include/class.ticket.php approximately line 2260:

 

$sql='UPDATE

'.TICKET_TABLE.' SET updated=NOW() '

            .'

,topic_id='.db_input($vars)

            .'

,number='.db_input($vars)

            .'

,sla_id='.db_input($vars)

            .' ,source='.db_input($vars)

           

.' ,duedate='.($vars?db_input(date('Y-m-d

G',Misc:($vars.' '.$vars))):'NULL');

Write a Reply...