Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

In this Discussion

osTicket v1.10 (stable) and Maintenance Release v1.9.15 are now available! Go get it now

"Custom Script" action for Ticket Filtering

Hi,
Some useful feature which I've already suggested in "Call for plugin ideas!", is a 'Custom Script' action for ticket filtering. 
It means that with a specific conditions for a ticket (e.g. from special email), set the action to run a Custom Php/etc. script rather than just assignment and static actions.
Also I'll appreciate if anybody let me know any ticketing system which already has this feature.

Comments

  • That's a really good idea. I'd love to abstract some of my custom scripts out of core. I'll have a look when I get a chance, there is definitely a few different ways to achieve this. love it, great idea!
  • Got it working:

    Run this mysql command: (your prefix may vary)

    ALTER TABLE ost_filter ADD custom_script VARCHAR(255);


    Use this patch (from 1.8 dev-next, so might need some work for default 1.8)
    https://gist.github.com/clonemeagain/8625660

    Includes an example php script which demonstrates the available entries for the Ticket array etc. Save it into a new folder in include/custom

    Admin interface simply globs this folder for scripts.

    Could probably be improved a lot, testing I forgot my Rule wasn't going to fire for every email, so I had to import a message ending in .com, which I thought would have been most of them ;-)

    So, you can fire the script for a Matching Rule. Awesome. Knocked it out in about two hours, spend most of that time testing and trying to get git to produce a working patch. Gah, I don't know why I find git so hard to understand.
  • edited July 11
    FYI: This is very possible now with plugins, simply hook the ticket.create.before signal to modify the ticket, or the ticket.created signal for afterwards. 
Sign In or Register to comment.