How do I add other sources for New Ticket created by staff?I would like to add Twitter, Facebook, Instagram so other staff seeing the ticket automatically knew where to refer if necessary.blank Reading an old post, I got the information that I cannot do this via the ui. In this post is not clear all necessary php files I need to edit. So, If someone can help me, thanks.

version of osTicket?moving thread to mods and customizations where it belongs.

on include/staff/ticket-open.php you can modify the following to add more source options:<?php echo __('Ticket Source');?>:            </td>            <td>                <select name="source">                    <option value="CUSTOMSOURCE" selected="selected"><?php echo __('CUSTOMSOURCE'); ?></option>                    <option value="Phone" <?php echo ($info=='Phone')?'selected="selected"':''; ?>><?php echo __('Phone'); ?></option>                    <option value="Email" <?php echo ($info=='Email')?'selected="selected"':''; ?>><?php echo __('Email'); ?></option>                    <option value="Other" <?php echo ($info=='Other')?'selected="selected"':''; ?>><?php echo __('Other'); ?></option>                </select>However, when creating a ticket this will give you an error.  So you need to add your custom source to the array on line 3370 in /include/class.ticket.php for example:if ($vars && !in_array(            strtolower($vars), array('customsource','email','phone','other'))        ) {            $errors = sprintf(                __('Invalid source given - %s'),Format:($vars)            );        }note, in this array your source should be written in lowercase, because the php checks against lowercase strings.You will also need to modify include/staff/ticket-edit.php in a similar fashion.

I think you also need to modify the database since the type is stored as an enum and that does not allow custom types. If would be good if the devs made it possible to add new sources so plugins could add this themselves.

Fyi, I have created a Facebook plugin here:

http://forum.osticket.com/d/discussion//facebook-integration-plugin

There is also a feature request for adding new ticket source via the gui. And one of the developers (greezybacon) seems to like it:https://github.com/osTicket/osTicket-1.8/issues/2369So the chances are not bad that this will be possible in a future release..

Write a Reply...