Removing System scripts

Hi all,

We are currently trying to consolidate some old Service features. One thing we would like to do is to remove the "System scripts" functionality and use triggers instead. We will create some new triggers for the current System scripts event. The plan is to copy any existing system scripts to triggers during upgrade, and then remove the System scripts UI. Does anyone think this will be a problem?

Speak now or forever hold your peace :)

Sverre

RE: Removing System scripts

Hello,

We have extensively used the 'Mailbox, run before message is saved' and 'Saving a request' system scripts at multiple customers.

As long as the scripts are migrated as-is to a trigger and the same variables are available (using getVariable), then I don't see an issue.

Please make extra sure that events are still executed in the same order related to the mailbox & ticket save, otherwise this change will break a lot of customizations. When developing scripts we always use the following as reference which we took from DevNet:1) Get email from mail server
2) Analyze email
3) Run "Mailbox event, executed before message is saved" script
4) Run mailbox filter code (except attached script)
5) Store message to the system (SAVE REQUEST HERE!)
6) Run "Mailbox event, executed after message saved" script
7) Run mailbox filter attached scripts
8) Send notifications

 

 

Av: David Hollegien 18. feb 2019

RE: Removing System scripts

Hi Sverre, 

one of the key features when using the System Scripts -> Saving a request, is that we have easy access to the old and new parser variables of an attribute. Is this something you will add with the way you're going to create the triggers?

Although I understand that it's not a memory effecient way of doing things.

Av: Simen Mostuen Iversen 18. feb 2019

RE: Removing System scripts

My plan is to execute the scripts in the exact same location with the exact same environment. We are aware that these scripts have been used lots of places and we do not want to break anything. The only changes you should experience are:

  1. There is a different place to edit the scripts (under triggers).
  2. You can now have more than one script for one these events (i.e. mulitple "On ticket save" scripts).
  3. It is easy to enable/disable the scripts.
  4. It is possible to trace the scripts.

I am a bit uncertain what to do with package import. I either have to do the same as upgrade: move any included system scripts to triggers, or ignore any system scripts (i.e. you should upgrade your source system before exporting).

Sverre

Av: Sverre Hjelm 18. feb 2019

RE: Removing System scripts

Hi, 

In addition to what Simen and David describe, we also used the system script MainMenu in a lot of cases where we wanted to created userGroup dependant navigator menus.

I don't see right now how these will be replaced by triggers. 

Av: Niels van Broekhoven 18. feb 2019

RE: Removing System scripts

Your system script which manipulates the menu will be moved to a trigger script doing exactly the same :)

Sverre

Av: Sverre Hjelm 18. feb 2019