Skip to content

Conversation

@rubenvdlinde
Copy link
Contributor

No description provided.

cursoragent and others added 30 commits November 30, 2025 09:05
Co-authored-by: ruben <ruben@conduction.nl>
Co-authored-by: ruben <ruben@conduction.nl>
Co-authored-by: ruben <ruben@conduction.nl>
Co-authored-by: ruben <ruben@conduction.nl>
Co-authored-by: ruben <ruben@conduction.nl>
This commit cleans up code formatting and updates documentation across various files. It also includes minor adjustments to migration files and service classes for better readability and maintainability.

Co-authored-by: ruben <ruben@conduction.nl>
This commit enhances type safety by adding explicit type hints and improving variable handling in several controller and service classes. It also refactors loop variables to use an underscore prefix where the original variable is not used, improving code clarity.

Co-authored-by: ruben <ruben@conduction.nl>
Co-authored-by: ruben <ruben@conduction.nl>
This commit refactors code in several files to improve readability and maintainability. It also addresses minor issues found during code review.

Co-authored-by: ruben <ruben@conduction.nl>
Co-authored-by: ruben <ruben@conduction.nl>
Co-authored-by: ruben <ruben@conduction.nl>
Co-authored-by: ruben <ruben@conduction.nl>
Co-authored-by: ruben <ruben@conduction.nl>
Co-authored-by: ruben <ruben@conduction.nl>
Co-authored-by: ruben <ruben@conduction.nl>
Co-authored-by: ruben <ruben@conduction.nl>
Co-authored-by: ruben <ruben@conduction.nl>
…r-paralellisation

Parallelisation of collection calls from openconnector
…itory-composer-1-f142' into test/indipendentagents
Co-authored-by: ruben <ruben@conduction.nl>
…composer-1-335a' into test/indipendentagents
…itory-composer-1-f142' into test/indipendentagents
Also fix two style errors
Fixing the showing of published objects in dashboard
rubenvdlinde and others added 30 commits January 15, 2026 11:29
PROBLEM:
- Bulk imports (CSV, ArchiMate) showed 0 for created/updated/unchanged statistics
- Objects were processed successfully but counts weren't tracked

ROOT CAUSE:
1. SaveObjects.php wasn't merging 'unchanged' arrays from chunk results
2. ChunkProcessingHandler.php checked for 'created'/'updated' fields but
   database returns 'object_status' field instead
3. Result arrays weren't populated during object classification

SOLUTION:
1. Fixed mergeChunkResult() to merge 'unchanged' arrays and increment stats
2. Changed condition to check isset(object_status) instead of created/updated
3. Populate result arrays (saved/updated/unchanged) during classification loop
4. Added objectsCreated/Updated/Unchanged aliases for compatibility

IMPACT:
- All bulk imports now show correct statistics
- Both OpenRegister CSV import and SoftwareCatalog ArchiMate import benefit
- Tested: ArchiMate import correctly shows 8802 updated objects
Fixed critical bug on line 2524 where $this->$qb->escapeLikeParameter()
was causing 'Object of class QueryBuilder could not be converted to string' error.
Changed to correct syntax: $qb->escapeLikeParameter().

This was preventing object creation in magic tables and causing API failures.
…port

- Modified transformSelfProperty() to convert created and updated datetime fields
- Converts ISO 8601 format (2014-03-26T10:13:27+00:00) to MySQL format (2014-03-26 10:13:27)
- Fixes MariaDB 'Invalid datetime format' error during CSV import
- Added debug logging to track datetime transformations

Also fixed earlier:
- ObjectEntityMapper.php line 2524: removed incorrect $this-> before $qb->escapeLikeParameter()

Tested with multiple CSV imports (96,496 objects) with validation enabled - 0 errors.
…ints

- Modified LogService to inject and use UnifiedObjectMapper instead of ObjectEntityMapper
- Modified ReadFileHandler to inject and use UnifiedObjectMapper
- Fixed parameter name: use 'identifier' not 'id' for UnifiedObjectMapper->find()
- Endpoints now support both magic tables and blob storage objects

This fixes 404 errors on:
- /api/objects/{register}/{schema}/{id}/audit-trails
- /api/objects/{register}/{schema}/{id}/files

Tested with magic table object (organisatie): both endpoints return successfully.
- Fix QueryBuilder prefix issue in findAcrossAllMagicTables: use $tableName
  instead of $fullTableName since QueryBuilder adds 'oc_' prefix automatically
- Fix parameter name mismatch in convertRowToObjectEntity: use _register/_schema
  instead of register/schema to match method signature
- Fix DeleteObject.delete() to properly handle ObjectEntity objects when called
  from deleteObject() instead of only handling array input
- Update deleteObject() to accept nullable register/schema and use context from
  findAcrossAllSources for cascading deletes
- Add error logging for failed delete operations
- Fix variable name in ObjectsController from $renderedObject to $renderedData
  for @self metadata

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
When rendering Twig-templated default values, the context now includes
both the existing object data AND the incoming request data. This allows
default values like `{{ type }}` to reference newly submitted properties,
enabling backward-compatible schemas where new specific type fields can
inherit values from existing generic fields.

Example use case: organisatieType can default to `{{ type }}` so old forms
that only submit `type` continue to work while new forms can explicitly
set `organisatieType`.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Add API endpoints for syncing magic tables (/api/tables/sync)
- Enhance updateTableStructure to de-require columns no longer needed
- Fix duplicate column detection using actual snake_case column names
- Drop duplicate camelCase columns when snake_case version exists
- Make obsolete columns nullable to preserve data
- Add indexes for relation properties and facetable fields
- Support GIN indexes for JSONB array columns in PostgreSQL

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
The findByRelationUsingRelationsColumn and findByRelationBatchInSchema
methods were using incorrect JSONB queries to search the _relations column.

The _relations column stores objects like {"propertyName": "uuid"} but
the queries were searching for ["uuid"] (an array), which never matched.

Fixed by:
- PostgreSQL: Using jsonb_each_text to search for UUID as a value
- MySQL: Using JSON_SEARCH to find UUID anywhere in the object

This fixes _extend not working for array relations like:
- organisatie -> contactpersonen (inverse of contactpersoon.organisatie)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Changed all event dispatching to use dispatchTyped() instead of
  dispatch(ClassName, event) for compatibility with registerEventListener()
- Fixed rowToObjectEntity to map database column names back to schema
  property names (e.g., e_mailadres -> e-mailadres)
- This ensures services work with schema-defined property names, not
  database column names

Files changed:
- MagicMapper.php: dispatchTyped + property name mapping
- ObjectEntityMapper.php: dispatchTyped
- OptimizedBulkOperations.php: dispatchTyped

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
The convertRowToObjectEntity method was using columnNameToPropertyName
which converts snake_case to camelCase (e.g., e_mailadres -> eMailadres).
This is incorrect for properties like 'e-mailadres' where the original
name contains hyphens.

Now uses schema-based mapping to restore original property names:
- e_mailadres -> e-mailadres (correct)
- Falls back to camelCase conversion for unmapped columns

This fix complements the earlier fix to rowToObjectEntity() by ensuring
both row-to-entity conversion methods use the same property name mapping.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
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.

7 participants