Auto Close Ticket V2
🤦 🤦 🤦 Combodo's customers only 😎 😎 😎
- name:
- Auto close Ticket
- description:
- Automatically close resolved User Request and Incident tickets
- version:
- 2.0.5
- release:
- 2022-03-22
- itop-version-min:
- 2.4.0
- code:
- combodo-autoclose-ticket
- diffusion:
- ITSM Designer
- php-version-max:
- PHP 8.0
Features
This extension allow to close automatically Tickets after a configurable delay.
-
Can be used with any Ticket class, in fact any class with a lifecycle.
-
It applies a configurable stimulus to objects:
-
being in a state (by default:
resolved
), with a field date (by default:resolution_date
) older than a delay (by default: 7 days). All those parameters are configurable. -
or being returned by an OQL query (advanced option)
-
-
You can choose at what time of the day and which days, to batch process those Tickets.
Limitations
Currently limited to one single closing rule per Class, use OQL and maybe UNION if you have specific need, but remember that the same stimulus will be applied for all.
Requirements
No requirement
Revision history
Date | Version | Description |
---|---|---|
2022-03-22 | 2.0.5 | * Remove deprecated functions * version iTop min 2.4.0 |
2021-12-21 | 2.0.4 | Spanish translations (thanks to Miguel Turrubiates !) |
2021-12-20 | 2.0.3 | Slovak Translation |
2018-12-04 | 2.0.2 | Internal changes |
2018-06-27 | 2.0.1 | DE translations update |
2018-02-12 | 2.0.0 | Make extension generic for all objects with a lifecycle |
2016-08-10 | 1.0.1 | Performance optimization: do not load all the columns of the tickets in the query. |
2014-03-04 | 1.0.0 | First release |
Installation
Use the Standard installation process for this extension.
The extension creates automatically one or two Closing
Rules
objects, assuming your Datamodel supports them. If it
fails to create those rules, an error message will be stored in the
setup.log. You would have then to create them manually, aligned
with your DataModel.
Configuration
Once the new module has been installed, edit the configuration file config-itop.php and look for the following new section:
'combodo-autoclose-ticket' => array ( 'week_days' => 'monday, tuesday, wednesday, thursday, friday, saturday, sunday', 'time' => '03:00', 'enabled' => true, 'debug' => false, ),
The following settings are available to configure the module:
Parameter | Type | Description | Default Value |
---|---|---|---|
week_days | string | Coma separated weekdays when the batch process should run. | monday, tuesday, wednesday, thursday, friday, saturday, sunday |
time | hour:minute | Time of the day, when the process should start. | 03:00 |
enabled | boolean | Should the process run? | true |
debug | boolean | Should the CRON log be enrich with debug information? | false |
The automatic closure is handled by the service cron.php once a day. Make sure this one is scheduled to run on your system. More information in the chapter about Background tasks.
To check the status of this service, use the command:
php webservices/cron.php --auth_user=user --auth_pwd=password --status_only=1
Extension Upgrade
If you had an older version of that extension, the Configuration file will have those parameters.
'combodo-autoclose-ticket' => array ( 'incident_autoclose_delay' => 'No longer used, you can remove this parameter.', 'userrequest_autoclose_delay' => 'No longer used, you can remove this parameter.', ),
which can be removed as they aren't used anymore!
Usage
The extension brings a new Menu entry Closing
rules and the associated objects
-
One for UserRequest
-
One for Incident (not available in Simple Ticketing)
-
You can modify the automatically created rules to change the delay or define a closing logic which would be dependent on service, customers, teams,… whatever you want as long as an OQL can return the objects in scope of the automatic closure.
-
You can create new
Closing Rule
, but you can define only oneClosing Rule
per class.
-
You can use the simple option, or the advanced. As soon as an OQL is entered, the advanced option is used.
Create a closing rule
-
Give it any Name you like,
-
Define the Class of Ticket on which the rule will be applied,
-
Define the Stimulus code to apply to objects in scope,
-
Define an optional History entry which will be added to the history of the objects which are closed automatically,
-
Give it a Status, to enable the cron to execute this Closing rule in the Background task.
-
Choose an Applied option by filling the fields either in …option 1 (simple) or in …option 2 (advanced) fieldset.
-
Define the Pre-closing state code (by default:
resolved
): only objects in this state are in scope, -
Define the Date to check (by default:
resolution_date
) -
Define the Autoclose delay (by default: 7 days): only objects with a date to check older than this delay are in scope,
-
-
Or
-
Define the OQL scope with an OQL query returning the objects on which to apply the stimulus.
-
-
You can check anytime which objects would be closed if the Closing Rule is activated.
-
Your OQL is automatically enriched with a condition on the object states, as only the states where the stimulus is applicable according to your DataModel, are selected.