Skip to content
This repository was archived by the owner on Jan 25, 2023. It is now read-only.

Archiving items in GLPI

Walid Nouh edited this page Sep 11, 2017 · 1 revision

Goal

Provide a generic way to archive items into GLPI. Archiving is a common feature request. For the moment, the current way of achieving it is to create another hierarchy of entities, and to move items in it.

Pros :

  • seperate entity : separate view, not counted in the stats
  • standard method, using the current GLPI capabilities

Cons :

  • complex to manage
  • need to give users the right to see and transfer assets in the entity
  • there's no builtin method to move an asset automatically into the archive

Proposal

New field

Add a new boolean field in each asset table is_archived.

  • is_archived = 0 : the item is not archived
  • is_archived = 1 : the item is archived

Add a new right to archive items.

Factorization

It's mandatory to add the new field for each table having a is_deleted field. Manage deleted and archive items using Search::addDefaultWhere method.

API changes

Add a new flag to getItems to retrieve or not archived items.

UI changes

Switch from normal to archive mode but clicking on an icon from the search engine view. Same behaviour as for the trash bin. Change the background colour to indicate that we're in archive mode.

Questions :

  • how to display deleted content ? (for example deleted tickets on a computer page)
  • should archived elements be displayed in connection tabs (for example connections for a computer) ?

Impact on plugins

Plugins need to be adapted to handle the archive feature.

  • the uninstall plugin should handle archive as an option
Clone this wiki locally