Skip to content

fix(cmdb-import): map the CMDB export as the file has it - #1219

Open
WilcoLouwerse wants to merge 2 commits into
developmentfrom
fix/cmdb-import-eol-as-is
Open

WilcoLouwerse wants to merge 2 commits into
developmentfrom
fix/cmdb-import-eol-as-is

Conversation

@WilcoLouwerse

@WilcoLouwerse WilcoLouwerse commented Oct 2, 2026 •

Copy link
Copy Markdown

Summary

Follow-up to #1209 (WOO-586). The first imports of the Rotterdam CMDB export showed where the mapping did not fit the file:

End-of-Life Functioneel stored as the file has it. The CMDB sheets write 2036-01-01 (Excel serial 49675) when TOPdesk has no date; the import read that as empty. The municipality wants the file's value kept.

Lookups for the values the real export holds (all 466 warnings of the full import came from these):

  • Applicatiesoort is an application kind (Webapplicatie, Client/server, Beheertool, Saas, …), not a hosting model. It is now kept as is in a new module property applicationType. Only SaaS/PaaS/IaaS/on-premises also set cloudDienstverleningsmodel; any other kind leaves it empty without a warning (lookup default: null, which the service leaves out).
  • BNN Classificatie holds 1, 2 and 2+: they map to BBN1, BBN2 and BBN2+. The register fragment adds BBN2+ to the bbnLevel enum (module schema 0.3.7). NB stays empty.
  • Applicatie Status: five unmapped statuses fell back to the schema default In production. They now map to Moet verwijderd worden → To be phased out, Verwijderd → Phased out, Besteld / Wordt getest → Acquisition, Stand-by voor continuïteit → In production.
  • Classificatie 1. Tolereren (wordt ingelezen) → Tolerate.

Docs (docs/features/cmdb-import.md) and the cmdb-export-import change artifacts follow suit.

Test plan

  • vendor/bin/phpunit -c phpunit-unit.xml --filter Cmdb: 92 tests, OK (no coverage driver locally); new test for the real export's values
  • phpcs clean on lib/Service/CmdbExportImportService.php
  • Test instance: register import gives module 0.3.7 with applicationType and BBN2+
  • Re-import the CMDB export with Update existing records: 0 warnings, statuses corrected, applicationType filled

🤖 Generated with Claude Code

The CMDB sheets write 2036-01-01 (serial 49675) when TOPdesk has no
end-of-life date. The import read that value as empty; the municipality
wants the date kept as the export has it. "NB" in BNN Classificatie stays
empty, since bbnLevel only takes BBN1-3.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@github-actions

github-actions Bot commented Oct 2, 2026

Copy link
Copy Markdown
Contributor

Quality Report — ConductionNL/stackiq @ a5e03ac

Check PHP Vue Security License Tests
lint ✅
phpcs ✅
phpmd ✅
psalm ✅
phpstan ✅
phpmetrics ✅
eslint ✅
stylelint ✅
build ✅
check-manifest ✅
check-vue-demi ✅
test-l10n ✅
format ✅
check-schema-l10n ✅
check-l10n-js ✅
composer ✅ ✅ 130/130
npm ✅ ✅ 807/807
app:check-code ⏭️
info.xml ✅
REUSE ❌
lockfile sync ✅
PHPUnit ✅
Newman ⏭️
Playwright ⏭️ deferred: E2E runs locally and on the promotion path only. This pull request targets development, so the suite is asked once per promotion into beta and main rather than once per push per open pull request. Run it locally with npx playwright test, or from the Actions tab on a branch with no open pull request into development.
Hydra gates ✅

Quality workflow — 2026-10-02 13:27 UTC

Download the full PDF report from the workflow artifacts.

The first full import of the Rotterdam export raised 466 warnings, all
from lookups that did not know a value:

- Applicatiesoort is an application kind (Webapplicatie, Client/server,
  Saas, ...), not a hosting model. It is now kept as is in the new module
  property applicationType; only SaaS/PaaS/IaaS/on-premises also set
  cloudDienstverleningsmodel, and any other kind leaves it empty without
  a warning (lookup default null, left out by the service).
- BNN Classificatie holds 1, 2 and 2+; they map to BBN1, BBN2 and BBN2+.
  The register fragment adds BBN2+ to the bbnLevel enum (module 0.3.7).
- Applicatie Status had five unmapped statuses, which fell back to the
  schema default In production; they now map to the lifecycle they mean.
- Classificatie "1. Tolereren (wordt ingelezen)" maps to Tolerate.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
**Placeholder values.** The CMDB sheets fill some empty cells with a
placeholder. These are read as empty: `NB` in `BNN Classificatie`, and the
date 2036-01-01 (Excel serial 49675) in `End-of-Life Functioneel`.
**Placeholder values.** The CMDB sheets fill an empty `BNN Classificatie`

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Concern — Docs do not say 2036-01-01 is a no-date sentinel that will be displayed

The text says 2036-01-01 is imported as a date, but not that the CMDB writes it for 'no end-of-life date'. The value is now shown as a real 'Phased out' date (PortalContributionProvider.php:195/281, PortfolioReportDerivation.php:60, GebruikSyncService.php:443) and drives derivePhase() in src/utils/lifecyclePhase.js:53, so from 2036-01-01 every such app derives as 'Phased out'. Add one sentence to the Placeholder values paragraph: the date is the CMDB's stand-in for 'no date', is stored and shown as a real phase-out date, and re-import with Update existing fills it where it was empty before.

Verification: grep -n startDateOutPhased lib/Portal/PortalContributionProvider.php src/utils/lifecyclePhase.js -> consumers display/derive on it

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔧 Proposed fix in #1223, commits 3dd75bb and 0160aed — the Placeholder values paragraph now says 2036-01-01 is the CMDB's stand-in for "no date", is stored and shown as a real phase-out date, and that a re-import with Update existing records fills it where empty and replaces a different stored date. The thread stays open until it is merged.

@WilcoLouwerse WilcoLouwerse left a comment •

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Verdict: APPROVE (Standard) — self-review posted as COMMENT (GitHub blocks self-APPROVE)

Keeping 2036-01-01 as the CMDB writes it is consistent across the profile, the date conversion (serial 49675 → 2036-01-01 on the 1899-12-30 epoch, no off-by-one), the unit test that asserts the stored value and the change artifacts. One sentence is missing from the docs.

🔧 Fix PR: #1223 — 1 of 1 findings, one commit each

Merge it into fix/cmdb-import-eol-as-is, then re-request the review. The other findings stay on their threads.

🟡 Concerns (1)

CI: quality / Hydra Gates and the other required checks are green on 42c29f7. quality / Features Check and quality / Quality Report are red and not required: Features Check reports docs/features.json out of date because development regenerated it in #1218 after this branch was cut; extract-features.py --app-root . --check passes on this branch merged with development, so updating the branch clears it.
Tests: phpunit --filter Cmdb was not re-run in this review (no vendor/ in the review clone); the 91 OK in the body is the author's run.
Stale copies: git grep -nE '2036|49675|placeholder|emptyValues|End-of-Life Functioneel' over lib/, src/, tests/, openspec/ and docs/features/ finds no copy that still describes 2036-01-01 as empty.

@WilcoLouwerse WilcoLouwerse changed the title fix(cmdb-import): store End-of-Life Functioneel as the file has it fix(cmdb-import): map the CMDB export as the file has it Oct 2, 2026
@github-actions

github-actions Bot commented Oct 2, 2026

Copy link
Copy Markdown
Contributor

Quality Report — ConductionNL/stackiq @ 4ca86e8

Check PHP Vue Security License Tests
lint ✅
phpcs ✅
phpmd ✅
psalm ✅
phpstan ✅
phpmetrics ✅
eslint ✅
stylelint ✅
build ✅
check-manifest ✅
check-vue-demi ✅
test-l10n ✅
format ✅
check-schema-l10n ❌
check-l10n-js ✅
composer ✅ ✅ 130/130
npm ✅ ✅ 807/807
app:check-code ⏭️
info.xml ✅
REUSE ❌
lockfile sync ✅
PHPUnit ✅
Newman ⏭️
Playwright ⏭️ deferred: E2E runs locally and on the promotion path only. This pull request targets development, so the suite is asked once per promotion into beta and main rather than once per push per open pull request. Run it locally with npx playwright test, or from the Actions tab on a branch with no open pull request into development.
Hydra gates ❌

Quality workflow — 2026-10-02 15:33 UTC

Download the full PDF report from the workflow artifacts.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant