You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Organisation merge never re-points modules and catalog services (findAllForType ignores _register/_schema) #1217
Found while reviewing the beta release PR #1026 (head ae22b32).
#1026 adds module and catalogService to MergeOrganisatieService::FIELD_RELATION_TYPES (and the matching ownership entries), so a merged-away supplier's applications and services move to the target. All of them are collected through findAllForType() (lib/Service/MergeOrganisatieService.php:799), which calls:
OpenRegister's ObjectService::prepareFindAllConfig() only reads filters.register / filters.schema (openregister/lib/Service/ObjectService.php:1522,1530) and otherwise uses the current register/schema context. Without a context MagicMapper::findAll() logs a warning and returns []; with a context left over from an earlier call it returns the wrong schema's objects. _rbac / _multitenancy also default to true, which limits results to the admin's active organisation.
Impact: the merge reports 0 re-pointed modules/services, tombstones the source organisation, and leaves its applications pointing at the merged-away supplier. The root cause also affects the pre-existing relation types. The unit test doesn't catch it because its mock keys on $config['_schema'] (tests/Unit/Service/MergeOrganisatieServiceTest.php:740).
Suggested fix:$objectService->setRegister($registerId)->setSchema($schemaId)->findAll(['limit' => …], _rbac: false, _multitenancy: false) (or searchObjects with @self.register / @self.schema plus a filter on the relation field), paginate instead of capping at 10000, and make the test mock fail on unknown config keys.
Activity
github-actions commentedon Oct 2, 2026
Thank you for opening this issue! It has been assigned to @rubenvdlinde for review.
What happens next:
Triage labels:
triage:accept-feature— accepted as a new featuretriage:accept-bugfix— accepted as a bug fixtriage:needs-info— more information neededtriage:wontfix— will not be addressedtriage:duplicate— duplicate of another issue