osTicket (v1.15.4)
Is there any feature to route emails to different departments based on date & time?
Thanks
osTicket (v1.15.4)
Is there any feature to route emails to different departments based on date & time?
Thanks
I presume you mean based on the date & time a ticket is created, eg between 8am and 6pm assigned to "Day Dept" and between 6pm and 8am assign to "Night Dept"?
This could be achieved fairly simply with a custom plugin.
Thanks @AdamDempsey
Are you referring to any ready plugin to build a plugin?
I'm not aware of an existing plugin, if I get time later I'll make a basic proof on concept plugin.
That would be awesome!!
Thanks
Here is a very basic proof of concept plugin, hard-coded to allow 3 time periods.
You set the time ranges and the department to be set upon ticket creation, there is some very basic validation on the times but this could definitely be improved and warn about overlaps etc.
Note this is based on the server time which may not match yours.
Looks perfect!! Thanks!!
You're welcome
Was fun little challenge to kill some time, deff some improvements that could be made but shows what can be done.
Is there any docs or examples you can show on how you built that? That appears to be awesome, and something I'd like to look at.
nerdyviking88 I've mostly learned from looking at other plugins, plus some information from the links below:
Plugin Development Introduction - https://github[dot]com/poctob/OSTEquipmentPlugin/wiki/Plugin-Development-Introduction
Awesome osTicket - https://github[dot]com/clonemeagain/awesome-osticket
If you get stuck post on the forums and someone may be able to help out
Hello All,
Sorry to pump up this post again, but I have tried this plugin and after installation I am getting this error in apache error.log "PHP Fatal error: Declaration of AutoDeptPlugin::uninstall() must be compatible with Plugin::uninstall(&$errors) in /var/www/html/osTicket/upload/include/plugins/autodept/autodept.php on line 68"
Os version: Ubuntu 22.04
PHP version: 8.0.28
OsTicket version: v1.16.1 (b42ddc7)
MySQL version: 10.6.12
PHP 8 is pretty strict now. The referenced resources above are likely outdated and do not fit the new PHP standards. You’ll have to modify your code to make PHP happy.
Cheers.
Thanks a lot for the fast response KevinTheJedi
Is there any way in osTicket system to get time based routing other than using this plugin?
Is there any hints or resources to modify the code to match the new PHP version checks/requirements? (I know it is off-topic, but any help will be very much appreciated)
kmahgoub The plugin should just need a minor change which I'll sort today
AdamDempsey Thanks for the good job you have done. I appreciate your response and help.
@AdamDempsey me too facing same error that @kmahgoub facing.
If you have free time could you please advice.
Thank you in advance for your time.
I ran out of time / forgot on Friday
Updated version attached which from my very quick tests is now working in 1.17.x
Didn't think anyone was actually using it, was meant more of a proof of concept.
AdamDempsey
Dear Adam. i would like to thank you for great job that you are doing.
unfortunately the plugin applied successfully this time but once enabled i faced below error
PHP Fatal error: Uncaught Error: Call to undefined method AutoDeptPlugin::getInstances() in /var/www/html/osTicket/upload/include/plugins/autodept/autodept.php:18\nStack trace:\n#0 /var/www/html/osTicket/upload/include/plugins/autodept/autodept.php(33): AutoDeptPlugin->getPluginInstance()\n#1 /var/www/html/osTicket/upload/include/class.plugin.php(147): AutoDeptPlugin->bootstrap()\n#2 /var/www/html/osTicket/upload/include/class.osticket.php(643): PluginManager->bootstrap()\n#3 /var/www/html/osTicket/upload/main.inc.php(33): osTicket::start()\n#4 /var/www/html/osTicket/upload/scp/staff.inc.php(20): require_once('...')\n#5 /var/www/html/osTicket/upload/scp/admin.inc.php(16): require_once('...')\n#6 /var/www/html/osTicket/upload/scp/plugins.php(2): require('...')\n#7 {main}\n thrown in /var/www/html/osTicket/upload/include/plugins/autodept/autodept.php
so please if you can support it will be appreciated.
thanks again for your time and the great job
haithamramadan This this version, whilst updating it to support 1.17.x it broke support for older versions that didn't have Plugin Instances.
AdamDempsey
Thanks a lot Adam for the great job. now it works on my current Os ticket version and also kept previous one in case i upgraded my current version.
you are the one. thanks a lot again for your effort, time and support