feat(cmdb): ITIL CI classification on asset types and lifecycle on assets (PMS-456) #336

Merged
YousifShkara merged 1 commit from feat/PMS-456-itil-ci-types into main 2026-06-23 10:51:32 +02:00
Owner

Layers an ITIL CI classification on the existing per-tenant CMDB. Adds two opt-in columns:

  • asset_types.itil_category tags the type with the industry-standard ITIL CI class (hardware / software / service / network / document / location, or a tenant-coined value). Free-text VARCHAR(50) so a tenant can coin a new category without a schema migration; the SPA offers the standard set as suggestions. Indexed partial on (tenant_id, itil_category) so the "show me all hardware CIs" filter is one index scan per category.

  • assets.itil_lifecycle_stage tracks the per-CI lifecycle position (planned / in_service / retired, or a tenant-coined value). Pulls onto the asset (not the type) because two assets sharing a type can be in different lifecycle positions all the time.

Both columns surface through AssetTypeResponse and AssetResponse for read, and through UpsertAssetTypeRequest / CreateAssetRequest / UpdateAssetRequest for write; existing rows surface as None and the SPA renders that as "Unclassified" / "Unknown" so an upgrade does not require backfill.

Phase 2 of PMS-456 (CI relationships graph traversal + impact analysis) is intentionally not in this PR. The existing asset_relationships table already gives the parent-child shape; the impact-analysis traversal + the SPA's CI map visualisation are tracked as a follow-up under the same ticket.

#PMS-456

Layers an ITIL CI classification on the existing per-tenant CMDB. Adds two opt-in columns: - `asset_types.itil_category` tags the type with the industry-standard ITIL CI class (hardware / software / service / network / document / location, or a tenant-coined value). Free-text VARCHAR(50) so a tenant can coin a new category without a schema migration; the SPA offers the standard set as suggestions. Indexed partial on (tenant_id, itil_category) so the "show me all hardware CIs" filter is one index scan per category. - `assets.itil_lifecycle_stage` tracks the per-CI lifecycle position (planned / in_service / retired, or a tenant-coined value). Pulls onto the asset (not the type) because two assets sharing a type can be in different lifecycle positions all the time. Both columns surface through AssetTypeResponse and AssetResponse for read, and through UpsertAssetTypeRequest / CreateAssetRequest / UpdateAssetRequest for write; existing rows surface as `None` and the SPA renders that as "Unclassified" / "Unknown" so an upgrade does not require backfill. Phase 2 of PMS-456 (CI relationships graph traversal + impact analysis) is intentionally not in this PR. The existing `asset_relationships` table already gives the parent-child shape; the impact-analysis traversal + the SPA's CI map visualisation are tracked as a follow-up under the same ticket. #PMS-456
YousifShkara force-pushed feat/PMS-456-itil-ci-types from 479a44f957
Some checks failed
E2E / Playwright against staging (pull_request) Successful in 1m5s
Check / fmt + clippy + build + tests (pull_request) Successful in 3m21s
Integration / integration tests (pull_request) Has been cancelled
to d25ebcaa2f
All checks were successful
E2E / Playwright against staging (pull_request) Successful in 1m0s
Check / fmt + clippy + build + tests (pull_request) Successful in 2m28s
Integration / integration tests (pull_request) Successful in 7m42s
Create release / Create release from merged PR (pull_request) Successful in 4s
2026-06-23 09:23:58 +02:00
Compare
YousifShkara deleted branch feat/PMS-456-itil-ci-types 2026-06-23 10:51:32 +02:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
psa-systems/mokosh-server!336
No description provided.