Kaseya Community

Add Logic to Template

This question is not answered

I have a certain workflow that I'd like to enforce through the Service Desk templates.  Certain techs are only allowed to work on tickets of certain Categories.  In addition, when they make a note to charge their time they should only be allowed to charge their specific time code (Resource Type).

So, I am looking to be able to do the following:

  1. When a new ticket is created and a Category is selected, the Assigned To combobox will only show techs who are allowed to work on that Category of ticket
  2. When that tech goes to charge his time to the ticket via a note, only his appropriate time code(s) should be available in the Resource Type combobox

That is the best case scenario.  It would also be acceptable to not filter the comboboxes but display an error and disallow saving of the ticket when an incorrect combination of tech/category or tech/resource type is selected.

So far I have looked into editing the template XML, obviously that won't work.  I've looked for .cs files into which I can insert this logic but everything is compiled into DLLs.  I've run the SQL profiler to see what queries are run to populate the comboboxes and the queries are directly executed from the DLLs (as opposed to being in a stored procedure or function that I could edit).  I see no way to accomplish this.

As a last resort, I suppose I could create a SQL trigger that watches for new tickets and new notes and sends an email if a violation has occurred, but the ticket has already been saved at that point.  I would prefer to disallow the saving of an incorrectly formed ticket.

Does anyone have any ideas?

All Replies
  • I was able to implement the crappy version of tech/category by using a sub procedure to halt the saving of a ticket and pop an error message if a bad combo was selected.  I say it's crappy because the Kaseya procedure logic is terrible and I had to write almost 200 lines where in a real language I could have written about 6 lines using regexs to accomplish the same thing.  But that aside, it accomplishes (kind of) what I wanted.

    I still can't do anything with the Resource Type though.