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.
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.
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.
Finding and assignment
A failing result opens a finding or updates the existing one; the finding is assigned to its owner.
Ticket
Findings for the same asset and the same owning group are gathered in a single correction ticket.
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.
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
| Template | Fails when | How it is fixed |
|---|---|---|
| DQ-01 Required field | A required field is empty on an in-scope asset | An authorised person enters a valid value |
| DQ-02 Owner | An active asset has no active technical owner or technical group | Ownership is assigned, with approval if required |
| DQ-03 Inactive user | The linked user is inactive, deleted or expired | A valid relation is assigned |
| DQ-04 Value set | The field is outside the allowed options | One of the defined options is chosen |
| DQ-05 Conditional requirement | The precondition holds and the target field is empty | The scope condition and the missing value are handled together |
| DQ-06 Referential integrity | The field points to a record that no longer exists | The right reference is chosen; nothing is guessed |
| DQ-07 Freshness | The data source was last seen longer ago than the set number of days, or never | The agent or source is examined; the date is not moved by hand |
| DQ-08 Business-owner attestation | The selected fields were not attested within the period | The 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 group | Checks |
|---|---|
| Engine: rules, scans, findings, assignment, tickets, score, entity isolation | 55 |
| Screens: the real page files, rights and entity isolation | 38 |
| Automatic actions: GLPI's real cron runner | 6 |
| Approval, conflicts, atomicity, exceptions, freshness, attestation, CSV, evidence | 60 |
| The screens of that stage, with different users | 26 |
Installation
sudo tar xzf inventoryquality-<version>.tgz -C /var/www/glpi/plugins
sudo chown -R www-data:www-data /var/www/glpi/plugins/inventoryquality
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).