Changing Requests to Incidents
This article provides instructions on how to change a Request to an Incident.
Justification
When promoting the use of Self-Help (aka Employee Interface) it is commonly a process dilemma deciding whether the End User should be creating an Incident or a Request or whether they should be empowered to create both. A good rule of thumb is if training of the Employee Interface is required, then its design has been over complicated. Keeping in mind that the End User will always be requesting something from IT (whether if be a request to fix something, a request for information, or a request for new equipment) the Request ticket is a logical starting point for the End Users. With this simple customization a Request ticket can be easily changed by IT to an Incident.
Why this works
Requests and Incidents are saved in the same table and share the same system resources. The only thing that distinguishes the two is the value of a field called type in the Call_Req table. If the value is an R then the ticket is a Request and an I is an Incident. By merely change an R to an I we convert a Request to an Incident without breaking any URLs, events, uploaded attachments, etc.
Step 1. Edit the detail_cr.htmpl
Add the following syntax to the detail_cr.htmpl to add a drop-down field for changing the ticket type: <source lang="html4strict"><PDM_IF "$args.id" != "0" && "$prop.form_name_3" == "edit" && "$args.KEEP.MAKE_COPY" != "1" && $args.children.length == 0> <PDM_MACRO NAME=dtlDropdown hdr="Ticket Type" attr=type lookup=no whereclause="sym!='Problem'" make_required=yes> </PDM_IF></source>
| $args.id != 0 | prevents the field from being displayed on a Request that has not yet been saved. |
| $prop.form_name_3 == edit | ensures the field is displayed only when in Edit mode. |
| $args.KEEP.MAKE_COPY != 1 | prevents the field from being displayed when a new Request is being created as a result of performing a copy of an existing Request. |
| $args.children.length == 0 | prevents the changing of a Request to an Incident if the Request has children. By not including this clause the Parent/Child concept of being only between tickets of the same type would be broken. |
| whereclause="sym!='Problem'" | removes Problem from the list of ticket types. |
| make_required=yes | ensures that there is always a type identified. Otherwise, <empty> could be selected which would impact searches and Stored Queries. |
For r11.x releases it is recommended that you edit your pages via the Web Screen Painter. For older releases you must edit the files directly.
Step 2. Clear the web cache
The final step is to clear Service Desk's cache. The methods vary depending on release.
For r11.x releases publish your changes via the Web Screen Painter. The process of publishing automatically initiates a pdm_webcache.
For older releases execute pdm_webcache from a command prompt on the Primary Server. There is no need to run this command on the Secondary Servers.
To discuss or ask questions about this article, select the discussion tab above.