Skip to content
Open
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
7 changes: 7 additions & 0 deletions .woodpecker/prod.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,13 @@ steps:
month: "*"
weekday: "*"
job: 'itkdev-docker-compose-server exec phpfpm vendor/bin/drush --uri="https://deltag.aarhus.dk" hoeringsportal:public_meeting:state-update'
course:
minute: "*/1"
hour: "*"
day: "*"
month: "*"
weekday: "*"
job: 'itkdev-docker-compose-server exec phpfpm vendor/bin/drush --uri="https://deltag.aarhus.dk" hoeringsportal:course:state-update'
deskpro:
minute: "*/5"
hour: "*"
Expand Down
11 changes: 10 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,14 @@ Versioning](https://semver.org/spec/v2.0.0.html).

## [Unreleased]

## [4.17.0] - 2026-06-15

* [PR-667](https://github.com/itk-dev/deltag.aarhus.dk/pull/667)
7805: Added display of owner name om proposal

* [PR-666](https://github.com/itk-dev/deltag.aarhus.dk/pull/666)
7740: Used blob ID as attachment index in Deskpro API call

* [PR-663](https://github.com/itk-dev/deltag.aarhus.dk/pull/663)
7577: Updated handling of start and end times on timeline

Expand Down Expand Up @@ -768,7 +776,8 @@ Updated drupal core 8.6.16

Initial release

[Unreleased]: https://github.com/itk-dev/hoeringsportal/compare/4.16.8...HEAD
[Unreleased]: https://github.com/itk-dev/hoeringsportal/compare/4.17.0...HEAD
[4.17.0]: https://github.com/itk-dev/hoeringsportal/compare/4.16.8...4.17.0
[4.16.8]: https://github.com/itk-dev/hoeringsportal/compare/4.16.4...4.16.8
[4.16.4]: https://github.com/itk-dev/hoeringsportal/compare/4.16.3...4.16.4
[4.16.3]: https://github.com/itk-dev/hoeringsportal/compare/4.16.2...4.16.3
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -393,7 +393,7 @@ public function getAttachments(array $blobs, $inline = FALSE) {
$attachments = [];

foreach ($blobs as $blob) {
$attachments[] = [
$attachments[$blob['blob_id']] = [
'blob_auth' => $blob['blob_auth'],
'is_inline' => $inline,
];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,15 @@ public function getHearingRepliesDeletedOn(NodeInterface $node): ?DrupalDateTime
return new DrupalDateTime() > $date ? $date : NULL;
}

/**
* Decide if replies have been deleted on a hearing.
*/
public function haveHearingRepliesBeenDeleted(NodeInterface $node): bool {
$deleteDate = $this->getHearingRepliesDeletedOn($node);

return NULL !== $deleteDate && $deleteDate < new DrupalDateTime();
}

/**
* Check if node is a hearing.
*/
Expand Down Expand Up @@ -339,6 +348,9 @@ public function synchronizeHearingTickets(Node $hearing) {
if (!$this->isHearing($hearing)) {
throw new \Exception('Invalid hearing: ' . $hearing->id());
}
if ($this->haveHearingRepliesBeenDeleted($hearing)) {
throw new \Exception('Hearing replies have been deleted on hearing ' . $hearing->id());
}

$deskproHearingId = $this->getHearingId($hearing);

Expand Down Expand Up @@ -445,9 +457,12 @@ public function runSynchronizeTicket(array $payload) {
try {
$lockName = __METHOD__;
if ($this->lock->acquire($lockName)) {
/** @var \Drupal\node\Entity\NodeInterface $hearing */
[$hearing, $ticketId] = $this->validateTicketPayload($payload);

if ($this->haveHearingRepliesBeenDeleted($hearing)) {
throw new \Exception('Hearing replies have been deleted on hearing ' . $hearing->id());
}

$ticket = $this->deskpro->getTicket($ticketId, [
'expand' => ['fields', 'person', 'messages', 'attachments'],
'no_cache' => 1,
Expand Down Expand Up @@ -533,8 +548,11 @@ public function runSynchronizeTicket(array $payload) {
* @param mixed $payload
* The payload.
*
* @return array
* The hearing node and ticket id ([NodeInterface, string]).
* @return array{
* 0: NodeInterface,
* 1: string
* }
* The hearing node and ticket id.
*
* @throws \RuntimeException
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,11 @@
</div>

<div class="node-metadata small">
{% set owner = anonymous_edit_helper.getContentOwner(node) %}
{% if owner and owner.name|default(false) %}
<div class="node-name">{{ owner.isCurrent ? 'You'|t : owner.name }}</div>
{% endif %}

<div class="node-time">
{{ node.changed.value|time_diff }}
{% if node.changed.value > node.created.value %}
Expand Down
Loading