Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
e98e407
UHF-12729: wip
jeremysteerio Feb 9, 2026
54ab1ae
UHF-12729: Use proper download urls for approval-type documents
jeremysteerio Feb 10, 2026
25a4280
UHF-12729: Split documents for index
jeremysteerio Feb 10, 2026
d224865
UHF-12729: Styling fixes
jeremysteerio Feb 11, 2026
d3b6a8a
UHF-12729: Remove unused code
jeremysteerio Feb 11, 2026
65a3448
UHF-12729: Fix phpcs
jeremysteerio Feb 11, 2026
4993ab4
UHF-12729: Fix phpstan
jeremysteerio Feb 11, 2026
42feb39
UHF-12729: Fix phpstan vol 2
jeremysteerio Feb 11, 2026
0eeafe8
UHF-12729: Fix tests
jeremysteerio Feb 11, 2026
59257bd
Merge pull request #851 from City-of-Helsinki/UHF-12729
jeremysteerio Feb 12, 2026
967daa2
Updated node modules based on npm audit fix
khalima Feb 15, 2026
3b5efc4
Merge pull request #845 from City-of-Helsinki/automation/npm-audit
khalima Feb 16, 2026
ff1bb4a
Fixed database export
tuutti Feb 17, 2026
6775ac7
Merge pull request #854 from City-of-Helsinki/UHF-X-fix-dump
hyrsky Feb 17, 2026
3782f25
Remove dmore/chrome-mink-driver
hyrsky Feb 18, 2026
9e69ba1
Merge pull request #855 from City-of-Helsinki/UHF-X-chrome-mink-driver
tuutti Feb 18, 2026
e008b56
UHF-12729: Add indication text
jeremysteerio Feb 19, 2026
7bceb7c
Update configuration
hel-platta-service Feb 20, 2026
9334c7f
Updated node modules based on npm audit fix
khalima Feb 22, 2026
8b5b8c7
prevent error
rpnykanen Feb 23, 2026
b66f022
Merge pull request #853 from City-of-Helsinki/update-configuration
rpnykanen Feb 23, 2026
6334dc8
Merge branch 'dev' into UHF-X_policymaker_null
rpnykanen Feb 23, 2026
f25ae2c
Merge pull request #858 from City-of-Helsinki/UHF-X_policymaker_null
rpnykanen Feb 23, 2026
c40904c
Merge pull request #856 from City-of-Helsinki/UHF-12729
jeremysteerio Feb 23, 2026
396c716
Update configuration
hel-platta-service Feb 23, 2026
241d7ca
Merge branch 'update-configuration' of https://github.com/City-of-Hel…
khalima Feb 23, 2026
80ee558
Updated minimatch.
khalima Feb 23, 2026
4018d22
Updated dist.
khalima Feb 23, 2026
c8ead04
Merge pull request #857 from City-of-Helsinki/automation/npm-audit
khalima Feb 23, 2026
77263e5
Merge pull request #859 from City-of-Helsinki/update-configuration
khalima Feb 23, 2026
e83c06e
Update configuration
hel-platta-service Feb 24, 2026
e64cbb2
Merge pull request #860 from City-of-Helsinki/update-configuration
khalima Feb 24, 2026
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
10 changes: 0 additions & 10 deletions compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -161,16 +161,6 @@ services:
- "traefik.port=9200"
profiles:
- search
artemis:
container_name: "${COMPOSE_PROJECT_NAME}-artemis"
image: apache/activemq-artemis
depends_on:
- app
networks:
- internal
- stonehenge-network
profiles:
- queue
chromium:
image: selenium/standalone-chromium
environment:
Expand Down
1 change: 0 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@
"require-dev": {
"dealerdirect/phpcodesniffer-composer-installer": "^0.7.0",
"dg/bypass-finals": "^1.8",
"dmore/chrome-mink-driver": "^2.8",
"drupal/core-dev": "^11",
"jangregor/phpstan-prophecy": "^1.0",
"phpstan/phpstan-deprecation-rules": "^1.1",
Expand Down
668 changes: 347 additions & 321 deletions composer.lock

Large diffs are not rendered by default.

1 change: 0 additions & 1 deletion conf/cmi/core.extension.yml
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,6 @@ module:
simple_sitemap: 0
social_media: 0
sophron: 0
stomp: 0
system: 0
taxonomy: 0
telephone: 0
Expand Down
7 changes: 6 additions & 1 deletion conf/cmi/editor.editor.full_html.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ dependencies:
module:
- ckeditor5
_core:
default_config_hash: UZ7ojJKs8sEbFs15e0Ub1i_p9w-K20fG40pkpotEWUw
default_config_hash: oCDUwt4GjXQJeBCiJlq5NKEU0d9JP2Kx3QZKMuDAi_g
format: full_html
editor: ckeditor5
settings:
Expand Down Expand Up @@ -146,6 +146,11 @@ settings:
weight: 18
search: '<a name="[^"]*">(.*?)<\/a>'
replace: $1
-
enabled: true
weight: 19
search: '(<a\b[^>]*?)\s+target\s*=\s*("_blank"|_blank)'
replace: $1
ckeditor5_sourceEditing:
allowed_tags:
- '<figure tabindex>'
Expand Down
7 changes: 6 additions & 1 deletion conf/cmi/editor.editor.minimal.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ dependencies:
module:
- ckeditor5
_core:
default_config_hash: CbXr91M60wTYziM5ZHPNPrGb9khkUYjzkVVdyE3re9o
default_config_hash: 5XykmWxByyrIQ2N9_zHqVQlMtBUy9wc5P9lPrM_g7oQ
format: minimal
editor: ckeditor5
settings:
Expand Down Expand Up @@ -128,6 +128,11 @@ settings:
weight: 18
search: '<a name="[^"]*">(.*?)<\/a>'
replace: $1
-
enabled: true
weight: 19
search: '(<a\b[^>]*?)\s+target\s*=\s*("_blank"|_blank)'
replace: $1
ckeditor5_sourceEditing:
allowed_tags:
- '<p data-chat-trigger>'
Expand Down
2 changes: 1 addition & 1 deletion conf/cmi/imagemagick.settings.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ _core:
default_config_hash: do7QLcSY6lDV82NBI3jy5FNsUwWFjjJzXmHPTGsSvIQ
quality: 75
binaries: imagemagick
imagemagick_version: v7
path_to_binaries: ''
prepend: ''
log_warnings: true
Expand Down Expand Up @@ -58,4 +59,3 @@ advanced:
colorspace: '0'
profile: ''
coalesce: false
imagemagick_version: v6
7 changes: 0 additions & 7 deletions conf/cmi/language/sv/views.view.archive.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,7 @@ display:
exposed_sorts_label: 'Sortera efter'
sort_asc_label: Stigande
sort_desc_label: Fallande
arguments:
created_year_month:
title: '{{ arguments.created_year_month }}'
block_1:
display_title: Block
display_options:
arguments:
created_year_month:
title: '{{ arguments.created_year_month }}'
page_1:
display_title: Sida
5 changes: 0 additions & 5 deletions conf/cmi/language/sv/views.view.files.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@ display:
display_options:
title: Filer
fields:
fid:
label: Fid
filename:
label: Namn
separator: ', '
Expand All @@ -26,8 +24,6 @@ display:
label: 'Datum för ändring'
count:
label: 'Används i'
alter:
path: 'admin/content/files/usage/{{ fid }}'
format_plural_string: !!binary MSBwbGFjZQNAY291bnQgcGxhY2Vz
pager:
options:
Expand Down Expand Up @@ -76,7 +72,6 @@ display:
label: 'Registrerar modul'
count:
label: 'Antal använd'
format_plural_string: !!binary MQNAY291bnQ=
pager:
options:
tags:
Expand Down
3 changes: 0 additions & 3 deletions conf/cmi/language/sv/views.view.user_admin_people.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,6 @@ display:
label: Roller
created:
label: 'Medlem i'
settings:
future_format: '@interval'
past_format: '@interval'
access:
label: 'Senast åtkomst'
settings:
Expand Down
9 changes: 9 additions & 0 deletions conf/cmi/search_api.index.allu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,14 @@ field_settings:
dependencies:
module:
- paatokset_allu
id:
label: ID
datasource_id: 'entity:paatokset_allu_document'
property_path: id
type: integer
dependencies:
module:
- paatokset_allu
label:
label: Label
datasource_id: 'entity:paatokset_allu_document'
Expand Down Expand Up @@ -112,6 +120,7 @@ datasource_settings:
processor_settings:
add_url: { }
aggregated_field: { }
allu_approval_type_split: { }
color_class: { }
custom_value: { }
decision_url: { }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -833,7 +833,7 @@ private function formatTrusteeName(string $name, $alt_format = FALSE): string {
* Formatted meeting title.
*/
public function getMeetingTitle(NodeInterface $meeting): string {
$policymaker_title = $this->policymaker->get('field_ahjo_title')->value;
$policymaker_title = $this->policymaker?->get('field_ahjo_title')->value ?? '';
$meeting_timestamp = strtotime($meeting->get('field_meeting_date')->value);
$meetingNumber = $meeting->get('field_meeting_sequence_number')->value;
$meetingYear = date('Y', $meeting_timestamp);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,7 @@ datasource_settings:
processor_settings:
add_url: { }
aggregated_field: { }
allu_approval_type_split: { }
color_class: { }
custom_value: { }
decision_url: { }
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,128 @@
<?php

namespace Drupal\paatokset_allu\Plugin\search_api\processor;

use Drupal\Core\Entity\EntityTypeManagerInterface;
use Drupal\paatokset_allu\Entity\Document;
use Drupal\search_api\Item\Item;
use Drupal\search_api\Processor\ProcessorPluginBase;
use Symfony\Component\DependencyInjection\ContainerInterface;

/**
* Splits items into one per approval_type value.
*
* Two-stage approach:
* - alter_items: Adds clone items (needs pass-by-reference). Clones share the
* original object so the pipeline's normal field extraction works on them.
* - preprocess_index: After field extraction, overrides approval_type on each
* clone to only the target value stored in extra data.
*
* @SearchApiProcessor(
* id = "allu_approval_type_split",
* label = @Translation("Allu approval type split"),
* description = @Translation("Split items by approval_type values - creates one document per value."),
* stages = {
* "alter_items" = 100,
* "preprocess_index" = 100
* }
* )
*/
final class AlluApprovalTypeSplit extends ProcessorPluginBase {

/**
* Constructs a new AlluApprovalTypeSplit object.
*/
public function __construct(
array $configuration,
$plugin_id,
$plugin_definition,
protected EntityTypeManagerInterface $entityTypeManager,
) {
parent::__construct($configuration, $plugin_id, $plugin_definition);
}

/**
* {@inheritdoc}
*/
public static function create(ContainerInterface $container, array $configuration, $plugin_id, $plugin_definition) {
return new static(
$configuration,
$plugin_id,
$plugin_definition,
$container->get('entity_type.manager')
);
}

/**
* {@inheritdoc}
*
* Determines which document items need splitting by querying the approval
* entities directly. Creates clone items with the same original object so
* the pipeline's normal getFields() extraction populates all fields.
*/
public function alterIndexedItems(array &$items): void {
$split_count = 0;

$original_ids = array_keys($items);
foreach ($original_ids as $item_id) {
$item = $items[$item_id];

if ($item->getDatasourceId() !== 'entity:paatokset_allu_document') {
continue;
}

$entity = $item->getOriginalObject()->getValue();
$approvals = $this->entityTypeManager
->getStorage('paatokset_allu_approval')
->loadByProperties(['document' => $entity->id()]);

$types = [];
foreach ($approvals as $approval) {
assert($approval instanceof Document);

$type = $approval->get('type')->value;
if ($type && !in_array($type, $types)) {
$types[] = $type;
}
}

if (count($types) <= 1) {
continue;
}

$item->setExtraData('split_approval_type', $types[0]);

foreach (array_slice($types, 1) as $delta => $type) {
$new_id = $item_id . '__split_' . ($delta + 1);
$new_item = new Item($item->getIndex(), $new_id);
$new_item->setOriginalObject($item->getOriginalObject());
$new_item->setLanguage($item->getLanguage());
$new_item->setExtraData('split_approval_type', $type);
$items[$new_id] = $new_item;
$split_count++;
}
}
}

/**
* {@inheritdoc}
*
* After the pipeline's field extraction has populated all fields (including
* approval_type with ALL values), override approval_type on split items to
* only the single target value.
*/
public function preprocessIndexItems(array $items): void {
foreach ($items as $item) {
$target_type = $item->getExtraData('split_approval_type');
if ($target_type === NULL) {
continue;
}

$field = $item->getField('approval_type');
if ($field) {
$field->setValues([$target_type]);
}
}
}

}
Loading