Skip to content

Commit

Permalink
fix(xo-server-backup-reports): fix undefined function in partial (#8229)
Browse files Browse the repository at this point in the history
In some failure cases, backup reports were not sent because of an error during handlebars compilation.
The `formatDate` function was incorrectly passed from partial to partial causing the `executeFunction` helper to execute `undefined` as a function (the `vmFailure` helper used default `formatDate=./formatDate` instead of `formatDate=../formatDate`, the `..` being necessary because of the `#each` loop)


Introduced by aa9c49c
  • Loading branch information
b-Nollet authored Jan 8, 2025
1 parent 6d836df commit cd2f74c
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.unreleased.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@

> Users must be able to say: “I had this issue, happy to know it's fixed”
- [Plugin/backup-reports] Backup reports were not sent on failure with storage issue on remote (PR [#8229](https://github.com/vatesfr/xen-orchestra/pull/8229))

### Packages to release

> When modifying a package, add it here with its release type.
Expand All @@ -31,4 +33,6 @@
<!--packages-start-->

- xo-server-backup-reports patch

<!--packages-end-->
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
- **UUID**: {{{uuid}}}
- **Type**: {{{taskLog.data.type}}}
{{>reportTemporalDataMd end=taskLog.end start=taskLog.start}}
{{>reportTemporalDataMd end=taskLog.end start=taskLog.start formatDate=../formatDate}}
{{>reportWarningsMd task=taskLog}}
- **Error**: {{{taskLog.result.message}}}
{{else}}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
<ul>
<li><span style="font-weight: bold">UUID</span>: {{uuid}}</li>
<li><span style="font-weight: bold">Type</span>: {{taskLog.data.type}}</li>
{{>reportTemporalDataMjml end=taskLog.end start=taskLog.start}}
{{>reportTemporalDataMjml end=taskLog.end start=taskLog.start formatDate=../formatDate}}
{{>reportWarningsMjml task=taskLog}}
<li><span style="font-weight: bold">Error</span>: {{taskLog.result.message}}</li>
</ul>
Expand Down

0 comments on commit cd2f74c

Please sign in to comment.