Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions lib/Portal/PortalContributionProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -171,8 +171,8 @@ private function vendorContribution(): array {
'listable' => true,
'fields' => [
'name',
'beschrijvingKort',
'beschrijvingLang',
'shortDescription',
'longDescription',
'website',
'type',
'modules',
Expand Down
10 changes: 10 additions & 0 deletions lib/Repair/RenameDutchCatalogColumns.php
Original file line number Diff line number Diff line change
Expand Up @@ -263,6 +263,16 @@ class RenameDutchCatalogColumns implements IRepairStep {
'vertrouwelijkheid' => 'confidentiality',
'vertrouwelijkheid(belangrijkste_reden)' => 'confidentiality_primary_reason',
'waardering' => 'rating',
'afkorting' => 'abbreviation',
'bbn_niveau' => 'bbn_level',
'beleidsdomein' => 'policy_domain',
'detailniveau' => 'detail_level',
'gebruiken' => 'usages',
'gemma_sortering' => 'gemma_sorting',
'groepering' => 'grouping',
'pakketversie_beschrijving' => 'package_version_description',
'publiceren' => 'publish',
'titel_view_swc' => 'title_view_swc',
];

/**
Expand Down
82 changes: 41 additions & 41 deletions lib/Service/ArchiMateImportService.php
Original file line number Diff line number Diff line change
Expand Up @@ -531,8 +531,8 @@ public function importArchiMateFileFromPath(array $options = []): array {
$statistics = $this->calculateObjectStatistics(normalizedData: $normalizedData);

// Calculate performance metrics.
$created = $statistics['summary']['total_objects_created'];
$updated = $statistics['summary']['total_objects_updated'];
$created = $statistics['omschrijving']['total_objects_created'];
$updated = $statistics['omschrijving']['total_objects_updated'];
$totalObjects = $created + $updated;
if ($totalObjects > 0) {
$itemsPerSecond = round($totalObjects / max($totalTime, 0.001), 2);
Expand Down Expand Up @@ -569,12 +569,12 @@ public function importArchiMateFileFromPath(array $options = []): array {
'total_used_mb' => round(($endMemory - $startMemory) / 1024 / 1024, 1),
],
'statistics' => $statistics,
'summary' => [
'total_objects_created' => $statistics['summary']['total_objects_created'],
'total_objects_updated' => $statistics['summary']['total_objects_updated'],
'total_objects_deleted' => $statistics['summary']['total_objects_deleted'],
'total_objects_skipped' => $statistics['summary']['total_objects_skipped'],
'total_errors' => $statistics['summary']['total_errors'],
'omschrijving' => [
'total_objects_created' => $statistics['omschrijving']['total_objects_created'],
'total_objects_updated' => $statistics['omschrijving']['total_objects_updated'],
'total_objects_deleted' => $statistics['omschrijving']['total_objects_deleted'],
'total_objects_skipped' => $statistics['omschrijving']['total_objects_skipped'],
'total_errors' => $statistics['omschrijving']['total_errors'],
],
'performance_metrics' => [
'items_per_second' => round($itemsPerSecond, 2),
Expand Down Expand Up @@ -997,7 +997,7 @@ private function extractSectionDataWithProperties(
}

if ($docValue !== null) {
$object['summary'] = $docValue;
$object['omschrijving'] = $docValue;
$object['documentation'] = $docValue;
// Also set documentation field for schema compatibility.
}
Expand Down Expand Up @@ -2322,7 +2322,7 @@ private function buildStatisticsFromSaveResult(): array {
'unchanged' => 0,
'errors' => [],
],
'summary' => [
'omschrijving' => [
'total_objects_created' => 0,
'total_objects_updated' => 0,
'total_objects_deleted' => 0,
Expand Down Expand Up @@ -2369,14 +2369,14 @@ private function buildStatisticsFromSaveResult(): array {

// Calculate summary totals.
foreach ($statistics as $section => $sectionStats) {
if ($section === 'summary') {
if ($section === 'omschrijving') {
continue;
}

$statistics['summary']['total_objects_created'] += $sectionStats['created'];
$statistics['summary']['total_objects_updated'] += $sectionStats['updated'];
$statistics['summary']['total_objects_unchanged'] += $sectionStats['unchanged'];
$statistics['summary']['total_errors'] += count($sectionStats['errors']);
$statistics['omschrijving']['total_objects_created'] += $sectionStats['created'];
$statistics['omschrijving']['total_objects_updated'] += $sectionStats['updated'];
$statistics['omschrijving']['total_objects_unchanged'] += $sectionStats['unchanged'];
$statistics['omschrijving']['total_errors'] += count($sectionStats['errors']);
}

return $statistics;
Expand All @@ -2397,7 +2397,7 @@ private function calculateOptimizedStatistics(): array {
'relationships' => ['created' => 0, 'updated' => 0, 'unchanged' => 0, 'errors' => []],
'views' => ['created' => 0, 'updated' => 0, 'unchanged' => 0, 'errors' => []],
'property_definitions' => ['created' => 0, 'updated' => 0, 'unchanged' => 0, 'errors' => []],
'summary' => [
'omschrijving' => [
'total_objects_created' => 0,
'total_objects_updated' => 0,
'total_objects_deleted' => 0,
Expand Down Expand Up @@ -2446,15 +2446,15 @@ private function calculateOptimizedStatistics(): array {
];

foreach ($statistics as $section => $sectionStats) {
if ($section !== 'summary') {
if ($section !== 'omschrijving') {
$summary['total_objects_created'] += $sectionStats['created'];
$summary['total_objects_updated'] += $sectionStats['updated'];
$summary['total_objects_unchanged'] += $sectionStats['unchanged'];
$summary['total_errors'] += count($sectionStats['errors']);
}
}

$statistics['summary'] = $summary;
$statistics['omschrijving'] = $summary;
}//end if

return $statistics;
Expand Down Expand Up @@ -2962,8 +2962,8 @@ private function extractViewNodesRecursively($nodeData, array $elementsLookup =
}

// Set description from element documentation.
if (isset($element['summary']) === true) {
$viewNode['description'] = $element['summary'];
if (isset($element['omschrijving']) === true) {
$viewNode['description'] = $element['omschrijving'];
} elseif (isset($element['documentation']) === true) {
$viewNode['description'] = $element['documentation'];
}
Expand Down Expand Up @@ -3243,7 +3243,7 @@ private function extractElementProperties(array $element): array {
$properties = [];

// Extract basic element properties.
$basicProperties = ['identifier', 'name', 'summary', 'section', 'model_identifier'];
$basicProperties = ['identifier', 'name', 'omschrijving', 'section', 'model_identifier'];
foreach ($basicProperties as $prop) {
if (isset($element[$prop]) === true) {
$properties[$prop] = $element[$prop];
Expand Down Expand Up @@ -4367,9 +4367,9 @@ private function transformViewsOptimized(

if (isset($item['documentation']) === true) {
if (is_array($item['documentation']) === true && isset($item['documentation']['_value']) === true) {
$object['summary'] = $item['documentation']['_value'];
$object['omschrijving'] = $item['documentation']['_value'];
} elseif (is_string($item['documentation']) === true) {
$object['summary'] = $item['documentation'];
$object['omschrijving'] = $item['documentation'];
}
}

Expand Down Expand Up @@ -4527,12 +4527,12 @@ private function buildElementsLookupFromRawData(
// Fast summary extraction.
if (isset($rawItem['documentation']) === true) {
if (is_array($rawItem['documentation']) === true && isset($rawItem['documentation']['_value']) === true) {
$element['summary'] = $rawItem['documentation']['_value'];
$element['omschrijving'] = $rawItem['documentation']['_value'];
} else {
if (is_string($rawItem['documentation']) === true) {
$element['summary'] = $rawItem['documentation'];
$element['omschrijving'] = $rawItem['documentation'];
} else {
$element['summary'] = '';
$element['omschrijving'] = '';
}
}
}
Expand Down Expand Up @@ -4770,9 +4770,9 @@ private function transformSectionObjectsBatch(
// Extract documentation from XML if it exists and set to summary.
if (isset($item['documentation']) === true) {
if (is_array($item['documentation']) === true && isset($item['documentation']['_value']) === true) {
$object['summary'] = $item['documentation']['_value'];
$object['omschrijving'] = $item['documentation']['_value'];
} elseif (is_string($item['documentation']) === true) {
$object['summary'] = $item['documentation'];
$object['omschrijving'] = $item['documentation'];
}
}

Expand Down Expand Up @@ -4871,7 +4871,7 @@ private function transformSectionObjectsBatch(
'xml',
'_propertyMapping',
'name',
'summary',
'omschrijving',
'viewNodes',
'viewRelationships',
]
Expand Down Expand Up @@ -5228,12 +5228,12 @@ private function bulkTransformSection(

if (isset($item['documentation']) === true) {
if (is_array($item['documentation']) === true && isset($item['documentation']['_value']) === true) {
$object['summary'] = $item['documentation']['_value'];
$object['omschrijving'] = $item['documentation']['_value'];
} else {
if (is_string($item['documentation']) === true) {
$object['summary'] = $item['documentation'];
$object['omschrijving'] = $item['documentation'];
} else {
$object['summary'] = '';
$object['omschrijving'] = '';
}
}
}
Expand Down Expand Up @@ -5414,12 +5414,12 @@ private function bulkTransformViews(

if (isset($item['documentation']) === true) {
if (is_array($item['documentation']) === true && isset($item['documentation']['_value']) === true) {
$object['summary'] = $item['documentation']['_value'];
$object['omschrijving'] = $item['documentation']['_value'];
} else {
if (is_string($item['documentation']) === true) {
$object['summary'] = $item['documentation'];
$object['omschrijving'] = $item['documentation'];
} else {
$object['summary'] = '';
$object['omschrijving'] = '';
}
}
}
Expand Down Expand Up @@ -5809,7 +5809,7 @@ private function calculateObjectStatistics(array $normalizedData): array {
];

foreach ($statistics as $section => $sectionStats) {
if ($section !== 'summary') {
if ($section !== 'omschrijving') {
// Skip summary section itself.
$summary['total_objects_created'] += $sectionStats['created'];
$summary['total_objects_updated'] += $sectionStats['updated'];
Expand All @@ -5818,21 +5818,21 @@ private function calculateObjectStatistics(array $normalizedData): array {
}
}

$statistics['summary'] = $summary;
$statistics['omschrijving'] = $summary;

// DEBUG: Log the summary statistics to help diagnose the issue.
$this->logger->info(
'[ArchiMate] Statistics summary calculated',
[
'summary' => $summary,
'omschrijving' => $summary,
'section_counts' => array_map(
fn ($s) => [
'created' => $s['created'] ?? 0,
'updated' => $s['updated'] ?? 0,
'unchanged' => $s['unchanged'] ?? 0,
'errors' => count($s['errors'] ?? []),
],
array_filter($statistics, fn ($k) => $k !== 'summary', ARRAY_FILTER_USE_KEY)
array_filter($statistics, fn ($k) => $k !== 'omschrijving', ARRAY_FILTER_USE_KEY)
),
]
);
Expand All @@ -5851,7 +5851,7 @@ private function extractDetailedErrors(array $statistics): array {
$detailedErrors = [
'total_count' => 0,
'by_section' => [],
'summary' => [],
'omschrijving' => [],
];

$sections = ['elements', 'relationships', 'organizations', 'views', 'property_definitions'];
Expand Down Expand Up @@ -5921,7 +5921,7 @@ private function extractDetailedErrors(array $statistics): array {

// Sort by frequency and take top 10.
uasort($allErrors, fn ($a, $b) => $b['total_count'] - $a['total_count']);
$detailedErrors['summary'] = array_slice(array_values($allErrors), 0, 10);
$detailedErrors['omschrijving'] = array_slice(array_values($allErrors), 0, 10);

return $detailedErrors;
}//end extractDetailedErrors()
Expand Down
12 changes: 6 additions & 6 deletions lib/Service/ArchiMateService.php
Original file line number Diff line number Diff line change
Expand Up @@ -2346,7 +2346,7 @@ private function calculateObjectStatistics(array $normalizedData): array {
];

foreach ($statistics as $section => $sectionStats) {
if ($section !== 'summary') {
if ($section !== 'omschrijving') {
// Skip summary section itself.
$summary['total_objects_created'] += $sectionStats['created'];
$summary['total_objects_updated'] += $sectionStats['updated'];
Expand All @@ -2355,7 +2355,7 @@ private function calculateObjectStatistics(array $normalizedData): array {
}
}

$statistics['summary'] = $summary;
$statistics['omschrijving'] = $summary;

return $statistics;
}//end calculateObjectStatistics()
Expand Down Expand Up @@ -2585,9 +2585,9 @@ private function transformSectionObjectsBatch(
// Extract documentation from XML if it exists and set to summary.
if (isset($item['documentation']) === true) {
if (is_array($item['documentation']) === true && isset($item['documentation']['_value']) === true) {
$object['summary'] = $item['documentation']['_value'];
$object['omschrijving'] = $item['documentation']['_value'];
} elseif (is_string($item['documentation']) === true) {
$object['summary'] = $item['documentation'];
$object['omschrijving'] = $item['documentation'];
}
}

Expand Down Expand Up @@ -2779,7 +2779,7 @@ public function getPropertyNameMapping(array $propDefMap): array {
*/
private function calculateOptimizedStatistics(): array {
$statistics = [
'summary' => [
'omschrijving' => [
'total_objects_created' => 0,
'total_objects_updated' => 0,
'total_objects_deleted' => 0,
Expand All @@ -2790,7 +2790,7 @@ private function calculateOptimizedStatistics(): array {

if ($this->lastSaveResult !== null) {
$saveResult = $this->lastSaveResult;
$statistics['summary'] = [
$statistics['omschrijving'] = [
'total_objects_created' => count($saveResult['saved'] ?? []),
'total_objects_updated' => count($saveResult['updated'] ?? []),
'total_objects_deleted' => 0,
Expand Down
2 changes: 1 addition & 1 deletion lib/Service/MergeOrganisatieService.php
Original file line number Diff line number Diff line change
Expand Up @@ -271,7 +271,7 @@ public function execute(string $sourceUuid, string $targetUuid, ?string $actorUi
}

$this->auditLog(
action: 'organisation-merge.execute.summary',
action: 'organisation-merge.execute.omschrijving',
context: [
'sourceUuid' => $sourceUuid,
'targetUuid' => $targetUuid,
Expand Down
6 changes: 3 additions & 3 deletions lib/Service/ModuleVersionService.php
Original file line number Diff line number Diff line change
Expand Up @@ -207,13 +207,13 @@ private function compareVersions(array $context): bool {
private function updateVersionRecord(array $context): void {
$moduleData = $context['moduleData'];
$moduleName = $moduleData['voorkeurnaam'] ?? $moduleData['name'] ?? 'Onbekende applicatie';
$moduleDescription = $moduleData['beschrijvingKort'] ?? '';
$moduleDescription = $moduleData['shortDescription'] ?? '';

$versionData = [
'module' => $context['moduleUuid'],
'version' => '1.0.0',
'beschrijvingKort' => $moduleDescription,
'beschrijvingLang' => '',
'shortDescription' => $moduleDescription,
'longDescription' => '',
'status' => 'in gebruik',
];

Expand Down
2 changes: 1 addition & 1 deletion lib/Service/OrganisatieService.php
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,7 @@ private function mapStatus(string $status): bool {
/**
* Internal method to create organization entity.
*
* Restores parent-child organisation hierarchy (VNG domain: gemeente →
* Restores parent-child organisation hierarchy (VNG domein: gemeente →
* samenwerkingsverband, moederorganisatie → deelnemende partij) that a
* prior hotfix disabled. The hotfix disabled parent assignment because a
* child organisation created with a parent became inaccessible to its
Expand Down
10 changes: 5 additions & 5 deletions lib/Service/PortfolioReportService.php
Original file line number Diff line number Diff line change
Expand Up @@ -242,12 +242,12 @@ private function buildRows(string $organisationUuid): array {
];

$gebruikResult = $objectService->searchObjectsPaginated(query: $gebruikQuery, _rbac: false, _multitenancy: false);
$gebruiken = $this->derivation->normalizeResults(results: $gebruikResult['results'] ?? []);
$total = (int)($gebruikResult['total'] ?? count($gebruiken));
$truncated = $total > count($gebruiken);
$usages = $this->derivation->normalizeResults(results: $gebruikResult['results'] ?? []);
$total = (int)($gebruikResult['total'] ?? count($usages));
$truncated = $total > count($usages);

$gebruikIds = [];
foreach ($gebruiken as $gebruik) {
foreach ($usages as $gebruik) {
$id = $this->derivation->resolveRelationId(value: $gebruik['id'] ?? ($gebruik['@self']['id'] ?? null));
if ($id !== '') {
$gebruikIds[] = $id;
Expand All @@ -257,7 +257,7 @@ private function buildRows(string $organisationUuid): array {
$contractsByGebruik = $this->fetchContractsForGebruiken(gebruikIds: $gebruikIds, cfg: $cfg, ceiling: $ceiling);

$rows = [];
foreach ($gebruiken as $gebruik) {
foreach ($usages as $gebruik) {
$rows[] = $this->buildRow(gebruik: $gebruik, cfg: $cfg, contractsByGebruik: $contractsByGebruik, now: $now);
}

Expand Down
2 changes: 1 addition & 1 deletion lib/Service/SettingsService.php
Original file line number Diff line number Diff line change
Expand Up @@ -3211,7 +3211,7 @@ private function getConnectionDetails(array $emailSettings): array {
return [
'type' => 'Mailgun API',
'has_api_key' => empty($emailSettings['mailgunApiKey']) === false,
'domain' => $emailSettings['mailgunDomain'] ?? '',
'domein' => $emailSettings['mailgunDomain'] ?? '',
];
case 'postmark':
return [
Expand Down
Loading
Loading