feat(contracts): record licences bought and in use, and see where use runs over the licence - #1188
Merged
Merged
Conversation
…es bought and in use
…ontract and on the License posture page
Contributor
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 on any branch from the Actions tab, or locally with npx playwright test. |
||||
| Hydra gates | ✅ |
Quality workflow — 2026-09-29 18:09 UTC
Download the full PDF report from the workflow artifacts.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Change:
contracts-licence-seats(archived here as2026-09-29-contracts-licence-seats; its spec is nowopenspec/specs/licence-seats/spec.md).Rows moved to built:
stackiq:ctr-licence-modelandstackiq:ctr-seat-count(both rated yes now).What a user can now do: record on a licence contract how the licence is measured (per named user, per concurrent user, per device, per inhabitant, per organisation or other) and how many licences were bought and are in use. The contract page shows a Licences panel with in use against bought as a bar and as numbers, and the state Within licence, Over licence by N, Unknown or Not counted, with the date of the last change. The License posture page has a Seats section that lists every counted licence contract, the ones furthest over their licence first.
How: a register fragment
lib/Settings/register.d/contracts-licence-seats.jsonaddslicenceMetric,licencesBoughtandlicencesInUse(integers, minimum 0) tocatalogContract;seatPosition()andseatRows()insrc/utils/licensePosture.js;ContractSeatsPanelregistered as a custom component on ContractDetail; the Seats section inLicensePostureView; two seeded demo contracts, one over and one within its licence. The overlay markslicense-and-seat-trackingstable.Scenarios and the tests that prove them:
tests/Unit/Settings/LicenceSeatsDeclarationTest.php(merged register: six metric values, both counts integer with minimum 0, schema version raised). Red on development: the fields do not exist there.tests/vitest/licenceSeats.spec.jsandtests/vitest/licenceSeatsLabels.spec.js. Red on development:seatPositionandseatRowsdo not exist there.tests/e2e/spec-coverage/licence-seats.spec.ts(Playwright, seeds and removes its own contracts). It lists (2 tests); it was not run here, because no local instance has a seeded stackiq register.New text is in English and Dutch. Docs:
docs/features/licence-seats.md; its screenshots wait for a seeded instance. The tasks namedlicensePosture.spec.jsand anavailableoverlay status; the tests live inlicenceSeats.spec.jsand the overlay's shipped value isstable, and the archived tasks say so.Checks (one run on the branch head, which contains development at 1edd2ba): composer check:strict exit 0; PHPUnit unit suite 922 tests, 20 errors, all inherited and identical by name to development (MigrateRegisterSlugTest x12, MigrateSchemaApplicationIdTest x7, PortfolioReportControllerTest x1); npm lint, stylelint, format, test:l10n, check:schema-l10n, check:l10n-js, check:manifest, check:vue-demi all exit 0; jest 100 passed; vitest 314 passed; Hydra Gates at CI version (ConductionNL/.github main, full coverage) exit 0, all 85 applicable gates passed.
openspec validate --strictvalid before archive;parity_verify.py --strictno finding but the census.Inherited: the 20 PHPUnit errors above, not touched here.
Live check: after the register re-imports, open a Licence contract, edit it, choose Per named user, 400 bought, 460 in use, save; the Licences panel reads Over licence by 60 with a red bar. Open License posture; the Seats section lists that contract first.