|
|
|
#1
|
|||
|
|||
|
Hi,
I made MOD for auto assigned ticket. If client or staff create a new ticket to a certain help topic, then the default staff who has been choosen before from Admin Panel, will be assigned to that ticket automatically. I also made the MOD in Admin Panel, which will help you to manage which staff you can choose or edit/change/switch as a default staff for a certain auto-assigned help topic. This default staff will automatically be auto-assigned when ticket is being created by client or even by staff. WARNING!!! Before doing this MOD, please follow my instruction at my #2 post below (scroll your mouse to the #2 post below)!!! ![]() ![]() You can also easily delete one or some auto-assigned staff if no longer needed, and this will not remove the staff record from staff table. Just FYI, you will find in some part of my code there are a lots of constants for language translation, because I implemented multi-languate in my osTicket. You can change that constants to the string based on the constant name or the original version of osTicket. Therefore, please be kind of this. ![]() Before doing this, please BACKUP ALL OF YOUR FILES as I am not responsible for any risk you will get further! Okay. Let's getting started now. First: Create new table named "ost_help_topic_auto_assign" Code:
CREATE TABLE `ost_help_topic_auto_assign` ( `auto_assign_id` int(11) NOT NULL auto_increment, `topic_id` int(11) NOT NULL, `dept_id` int(11) NOT NULL, `staff_id` int(10) NOT NULL, `created` datetime NOT NULL default '0000-00-00 00:00:00', `updated` datetime NOT NULL default '0000-00-00 00:00:00', PRIMARY KEY (`auto_assign_id`) ) ENGINE=MyISAM AUTO_INCREMENT=1 DEFAULT CHARSET=latin1; Second: Download the attachment file, extract the zip file, and put the .php files to the proper directory: \include\staff\. There are 2 files: - topicautoassign.inc.php - helptopicsautoassignlist.inc.php Third: Time to play with code... ![]() Open main.inc.php, FIND: PHP Code:
PHP Code:
Open \scp\admin.php, FIND: PHP Code:
PHP Code:
FIND: PHP Code:
PHP Code:
Open \include\staff\helptopics.inc.php, FIND: PHP Code:
PHP Code:
FIND: PHP Code:
PHP Code:
Open \include\class.ticket.php, FIND: PHP Code:
PHP Code:
Let me know your feedback. Thanks. Best regards, Masino Sinaga Last edited by masino_sinaga; 06-17-2009 at 12:21 AM. Reason: adding important warning in the top of this thread |
|
#2
|
|||
|
|||
|
Important!!!
Before apply the MOD above, make sure you have already done the MOD that I made via these 2 links below: - [MOD] Help Topic in New Ticket for Client and Staff - [MOD] Insert Staff ID Into Ticket Table The screenshot below is for monitoring; who are the staffs that have been assigned to available help topic. From this panel, you can also select which staff you want to delete in order not being auto-assigned to the specified help topic. Alternative way, you can also delete one staff from being auto-assigned and switch him/her to another staff in the same department from the screenshot number two in my first post above. ![]() Enjoy it..., and Cheers! ![]() Best regards, Masino Sinaga Last edited by masino_sinaga; 05-07-2009 at 08:27 AM. |
|
#3
|
|||
|
|||
|
Hi,
I updated this MOD by adding new code for validating the staff whether has been moved from one department to the new department. In my previous code for those of you who has implemented the MOD at my first post above (this code below that we want to update is located in \include\class.ticket.php file after the lines of this code): PHP Code:
PHP Code:
PHP Code:
![]() You see that there is a new column named "Valid?". This column will tell you which help topic auto-assigned record is valid or not. This column value will "No" or invalid, if the value between "Dept Assigned" is different with "Current Dept" column. "Dept Assigned" is department where the staff exist while he/she was being assigned to this help topic before, meanwhile "Current Dept" is the new or current department of that staff. In other words, we can see that this staff named "Masino Sinaga" has been moved to a new department. His old department is "Data Center", and his new department is: "Fourth Division". Why does this column exist? Because there is always a possibility a staff being moved to new department from Staff menu in Admin Panel, whereas his/her record in the help_topic_auto_assign table has not been changed automatically! You have to manage this auto-assigned staff from this, because we cannot predict to which new help topic this staff will be assigned in his new department, right? ![]() By updating the code above in this my current post, osTicket will check and compare whether this staff is valid or not. If not valid, then there will be no help topic would be auto-assigned to this staff. To update this list, please download the attachment file below, extract, and copy this file to \include\staff sub directory. If you have already the old file before, just replace it with this update file. Hope this will helpful for you. Thanks. Best regards, Masino Sinaga |
|
#4
|
|||
|
|||
|
That is a wonder MOD I think, Though I have not been able to use it as yet. You have mentioned First create a new table and have given the code. What do you mean by create a new table ?
Please help ![]() Thanks - Ron |
|
#5
|
|||
|
|||
|
Hi Ron,
"Create a new table" means that you have to create first an additional table in your osticket database. This step you must to do in order this MOD working as good as we want. I hope this helpful for you. Best regards, Masino Sinaga |
|
#6
|
|||
|
|||
|
I getting following error:
[SELECT staff_id FROM ost_help_topic_auto_assign WHERE dept_id= AND topic_id=] - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'AND topic_id=' at line 1 |
|
#7
|
|||
|
|||
|
Quote:
Cheers! ![]() Best regards, Masino Sinaga |
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | |
|
|