Scripts of Type Clone

In the Web Client, a ticket can be cloned (duplicated) using the Clone option in the ticket menu. You can do this with or without a script.

Figure 387: ConSol CM Web Client - Clone option in ticket menu

The following two pictures show the cloning of a ticket without a clone script.

Figure 388: ConSol CM Web Client - Original ticket

Figure 389: ConSol CM Web Client - Cloning the ticket (without Clone script)

When a ticket is cloned, the following data is transferred from the original ticket (compare the two images above):

When a ticket is cloned, the following data is not transferred from the original ticket (compare the two images above):

If the queue where the ticket is located uses a Clone script (see section Queue Administration), this script will be executed when the engineer clicks on Clone. The script can be used similarly to a Default values script (see respective section below): you can preset values in the newly-created ticket. In the cloning process the values are pre-filled in the Custom Fields in the Web Client, i.e., before the ticket is generated. The engineer can change the values if required.

Please keep in mind that in a Clone script, you do not work in the workflow context! That means the workflowApi object (implementation of WorkflowContextService) is not available!

In the following example, the Clone script is used to reset the data field Desired deadline to avoid having incorrect service dates in (cloned) Service Desk tickets.

ticket.set("serviceDesk_fields.desiredDeadline", null)

Code example 63: Clone script to reset Custom Field for desired deadline

When the script is assigned to the queue (ServiceDesk, in the example), the field for the desired deadline is empty when the cloned ticket is opened by the engineer (see following image).

Figure 390: ConSol CM Web Client - Cloned ticket (with Clone script assigned to the queue)