fix(cmdb-import): map the CMDB export as the file has it - #1219
WilcoLouwerse wants to merge 2 commits into
Conversation
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>
Quality Report — ConductionNL/stackiq @
|
| 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` |
There was a problem hiding this comment.
🟡 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
There was a problem hiding this comment.
🔧 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.
There was a problem hiding this comment.
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)
- Docs do not say 2036-01-01 is a no-date sentinel that will be displayed —
docs/features/cmdb-import.md:120. The date now shows as a real phase-out date in the portal contribution, the portfolio report andderivePhase(), and the docs do not say it stands for "no end-of-life date". (fix proposed in #1223)
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.
Quality Report — ConductionNL/stackiq @
|
| 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.
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):
applicationType. Only SaaS/PaaS/IaaS/on-premises also setcloudDienstverleningsmodel; any other kind leaves it empty without a warning (lookupdefault: null, which the service leaves out).1,2and2+: they map to BBN1, BBN2 and BBN2+. The register fragment addsBBN2+to thebbnLevelenum (module schema 0.3.7).NBstays empty.1. Tolereren (wordt ingelezen)→ Tolerate.Docs (
docs/features/cmdb-import.md) and thecmdb-export-importchange 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 valueslib/Service/CmdbExportImportService.phpapplicationTypeandBBN2+applicationTypefilled🤖 Generated with Claude Code