Scripts of the Type Clone

In the Web Client, a ticket can be duplicated using the Clone option in the ticket menu.

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

When a ticket is cloned, the following data is transferred from the original ticket:

  • ticket subject
  • queue
  • assigned engineer (if set)
  • values of all ticket fields (header and Details section)
  • main customer
  • additional customers

The following data is not transferred from the original ticket:

  • ticket history, including comments, emails and attachments
  • additional engineers
  • related tickets or resources

A clone script allows to overwrite this default behavior. You can use it to preset values in the newly created ticket, similarly to using a default values script. The engineer can change the values if required.

Steps to use a clone script:

  1. Write a script of the type Clone in the Scripts section of the Admin Tool.
  2. Assign the script to the desired queue (see Queues). Each queue can only have one clone script.

Coding Example

In the following example, the clone script is used to reset the data field Desired deadline to avoid having incorrect deadlines in cloned ServiceDesk tickets.

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

Code example 72: Clone script to reset ticket field for desired deadline

If the script is assigned to the queue ServiceDesk, the field for the desired deadline is empty in the cloned ticket instead of containing the deadline from the original ticket.

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.