Skip to content

Commit

Permalink
Merge branch 'feature/1043-template-convenience' into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
jekuaitk committed Apr 3, 2024
2 parents 28f88c7 + 4d96ba5 commit 6508d76
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
9 changes: 8 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,12 @@ about writing changes to this log.
Mock](https://github.com/Soluto/oidc-server-mock) for mocking
OIDC IdPs during development.

## [1.5.4] - 2024-04-03

- [PR-384](https://github.com/itk-dev/naevnssekretariatet/pull/384)
Added template placeholder relation data to recipient
prefix when creating hearing briefings.

## [1.5.3] - 2023-12-19

- [PR-377](https://github.com/itk-dev/naevnssekretariatet/pull/377)
Expand Down Expand Up @@ -310,7 +316,8 @@ Fixed error in unescaped characters in filename
- [TVIST1-604](https://jira.itkdev.dk/browse/TVIST1-604):
Resolved issue regarding time formats.

[Unreleased]: https://github.com/itk-dev/naevnssekretariatet/compare/1.5.3...HEAD
[Unreleased]: https://github.com/itk-dev/naevnssekretariatet/compare/1.5.4...HEAD
[1.5.4]: https://github.com/itk-dev/naevnssekretariatet/compare/1.5.3...1.5.4
[1.5.3]: https://github.com/itk-dev/naevnssekretariatet/compare/1.5.2...1.5.3
[1.5.2]: https://github.com/itk-dev/naevnssekretariatet/compare/1.5.1...1.5.2
[1.5.1]: https://github.com/itk-dev/naevnssekretariatet/compare/1.5.0...1.5.1
Expand Down
3 changes: 3 additions & 0 deletions src/Service/MailTemplateHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -377,6 +377,9 @@ private function getValues(?object $entity, TemplateProcessor $templateProcessor
$relationData = json_decode($this->serializer->serialize($relation, 'json', ['groups' => ['mail_template']]), true);

$data += ['relation' => $relationData];

// For convenience, we add the same relation data with relevant prefix to help users.
$data['recipient'] += $relationData;
} elseif ($entity instanceof AgendaBroadcast) {
$data += json_decode($this->serializer->serialize($entity->getAgenda(), 'json', ['groups' => ['mail_template']]), true);
}
Expand Down

0 comments on commit 6508d76

Please sign in to comment.