I’m using 2.0.4.5_beta_2018-11-28 and just noticed that you can set Duplicati to provide JSON output in the result email instead of the normal plain text. However, when I do this the subject for the resulting email is the beginning of the JSON output rather than the value of the send-mail-subject option. For example, instead of:
I am seeing:
I know the bodies should be different (JSON vs plaintext) but note the subject of the second email is just the JSON output repeated.
In both cases the send-mail-subject option is set to “Duplicati %OPERATIONNAME% report for %backup-name%”
Is this a deliberate design decision or a bug in the way Duplicati creates the JSON output emails?
It happens here: duplicati/ReportHelper.cs at 9bb6564657686f7b7ecfe27634c2b6c138fe64e2 · duplicati/duplicati · GitHub
It doesn’t use the subjectline
variable, unlike the normal flow, so it always returns the same JSON payload.
It’s a pretty tiny tweak, so I opened a PR on Github added boolean check to make the json output use the subject template … by Pectojin · Pull Request #3759 · duplicati/duplicati · GitHub
if (ExportFormat == ResultExportFormat.Json && !subjectline)
Thanks @Pectojin. I want to update dupReport to handle the new JSON report format, but the program keys off parsing the email subject line. Once your fix makes it through the channels I can begin upgrading my code.
How long does it usually take code fixes to make it into the canary builds? (I know the beta release cycle is somewhat slow )
HG
Canary usually comes out every few weeks but I guess it has been a while (24 days).
Sounds good. I’ll keep an eye out.