Open source
GLPI · Plugin

inventoryquality

Which inventory data can be trusted, and which needs fixing?

It audits GLPI 11 inventory records against quality rules the organisation defines. For missing, contradictory or stale information it opens a traceable finding, assigns the work to its owner and puts the fix through approval.

TypeGLPI · Plugin
CompatibilityGLPI 11
LanguagePHP
RulesDQ-01 … DQ-08
Tests185 / 185
Screenshots 1 / 4

OverviewQuality score, evaluation coverage and results per rule

Why

A trustworthy inventory takes more than entering records; you need to know which field is missing, which relation is broken and which information has gone stale, and to see that the fix was really made.

The plugin closes that loop: a finding closes only when the rule holds again on current data, and it cannot be closed by hand. Rules are built from ready-made templates; no free-form SQL, PHP or regular expressions are written.

Features

Eight rule templates

Required field, owner, inactive user, value set, conditional requirement, referential integrity, freshness and business-owner attestation. Every rule has a scope, severity, weight, deadline and approval policy.

Preview and versions

Before a rule goes live you see its effect on sample records. Every publication is a new version; who changed what and when is kept.

Events and scans

When a record is saved only that record is re-checked; a nightly full scan catches missed events.

De-duplicated findings

The same problem is not opened again and again. A recurring problem becomes a new period; first and last seen, recurrence count and history are kept.

Assignment and one ticket

The owner is resolved in order: the rule, the asset's technical group or owner, the entity's data-quality group. Work never goes to an inactive person. Findings for the same asset and owner are gathered in one ticket.

Correction and approval

Proposed corrections from inside the plugin, one or two sequential approval steps, evidence attachments and conflict detection. Nothing is written to the inventory until approvals are complete; the write happens in one transaction.

How it works

An example: the computer LT-042 has an empty location and an inactive linked user. Two rules fail and the two findings are gathered in one ticket.

  1. Evaluation

    A scan or a record event runs the rule. The result is one of four values: pass, fail, unknown or not applicable. A not-applicable result is left out of the score.

  2. Finding and assignment

    A failing result opens a finding or updates the existing one; the finding is assigned to its owner.

  3. Ticket

    Findings for the same asset and the same owning group are gathered in a single correction ticket.

  4. Correction

    The technician enters the value on the GLPI screen or proposes it from the plugin. If the rule needs approval, the proposal is applied only after the approval steps.

  5. Verification

    The record is re-checked automatically. If the rule holds, the finding is resolved; when all findings are resolved, a solution is added to the ticket.

Rule templates

TemplateFails whenHow it is fixed
DQ-01 Required fieldA required field is empty on an in-scope assetAn authorised person enters a valid value
DQ-02 OwnerAn active asset has no active technical owner or technical groupOwnership is assigned, with approval if required
DQ-03 Inactive userThe linked user is inactive, deleted or expiredA valid relation is assigned
DQ-04 Value setThe field is outside the allowed optionsOne of the defined options is chosen
DQ-05 Conditional requirementThe precondition holds and the target field is emptyThe scope condition and the missing value are handled together
DQ-06 Referential integrityThe field points to a record that no longer existsThe right reference is chosen; nothing is guessed
DQ-07 FreshnessThe data source was last seen longer ago than the set number of days, or neverThe agent or source is examined; the date is not moved by hand
DQ-08 Business-owner attestationThe selected fields were not attested within the periodThe business owner attests

Score, coverage and exceptions

The score is the share of passing results among passing and failing ones. Coverage is the share of records that could be evaluated at all. Both use the rule weights: 7 passing, 3 failing and 2 unknown results give a 70% score and 83.3% coverage.

An exception requires a reason, an approver and an end date at most 365 days ahead. It does not turn a failing result into a passing one; when it expires the record is re-checked.

Security

  • GLPI CSRF protection on every state-changing request; output is auto-escaped by Twig.
  • Values are bound through GLPI's query builder; field and table choices are limited to a validated catalogue.
  • In CSV, cells starting with =, +, - or @ are protected so they are not read as formulas.
  • Evidence files are stored under random names, typed by content and served only to authorised people.
  • System actions are recorded under a service identity; the requester and the approver are different people.

Tests

Tests run on a separate, clean GLPI 11 installation with its own database; test data is created and removed at the end.

Test groupChecks
Engine: rules, scans, findings, assignment, tickets, score, entity isolation55
Screens: the real page files, rights and entity isolation38
Automatic actions: GLPI's real cron runner6
Approval, conflicts, atomicity, exceptions, freshness, attestation, CSV, evidence60
The screens of that stage, with different users26

Installation

Unpack into the plugins directory
sudo tar xzf inventoryquality-<version>.tgz -C /var/www/glpi/plugins
sudo chown -R www-data:www-data /var/www/glpi/plugins/inventoryquality
Install and activate
sudo -u www-data php /var/www/glpi/bin/console glpi:plugin:install inventoryquality -u <admin>
sudo -u www-data php /var/www/glpi/bin/console glpi:plugin:activate inventoryquality

Scans and re-checks run as automatic actions; run GLPI's automatic actions in external mode (cron).

Source code, releases and full documentationgithub.com/CodeByPinar/inventoryquality
Open on GitHub
open to new projectsLet's work together