Archive ITIL items

When Items such as Requests and Incidents have been closed these can be archived so they no longer are visible in the system. Even if the no longer are shown on views they still reside in the database.

This done using the following SQL script that is on the NSP database:

/*

112         Request

281         Incident

282         Problem

292         Change

*/

 

UPDATE B

SET BaseStatus = -1

FROM SYS_DEF_TICKET T inner join SYS_DEF_BASEENTITY B on (T.Id = B.Id)

inner join SYS_DEF_ENTITY_STAGE S ON (T.BaseEntityStageId = S.Id)

where B.TypeId = 112

AND S.IsClosed = 1

AND B.CreatedDate >= '????-??-??' AND T.CloseDateTime <= '????-??-??'

Replace '??-??-??' with the time interval of interest.

 

If you have created your own Entitles for these items first find there ID by creating a script such as:

SELECT Id, EntityName, StorageName
FROM SYS_DEF_TABLE
WHERE StorageName IN ('TheUniqueNameOfYourItem')