[BUG] case.for_customer Not Populating in Templates
Describe the bug
The variable case.for_customer is not available in the case dictionary during template rendering, resulting in a failure to display the expected customer name in generated reports. Although case.client.customer_name contains the relevant data, case.for_customer is undefined, causing Jinja templates that rely on it to fail or display no output. This means that the documentation in https://docs.dfir-iris.org/operations/reports/ is inaccurate at least on this count.
To Reproduce
Steps to reproduce the behavior:
- Create a new report template that includes the
{{ case.for_customer }}variable. - Populate the case with valid client information.
- Generate a report using the template.
- Observe that the
case.for_customervariable does not render any output.
Expected behavior
The case.for_customer variable should be populated with the customer_name field from case.client and display the appropriate customer name in the report template.
Screenshots
N/A (This issue is directly related to rendered template output and debugging logs).
Additional context
- Debugging logs confirm that
case.client.customer_nameis populated as part of thecasedictionary, butcase.for_customeris missing. - Documentation indicates
case.for_customershould exist as a standard tag for templates. - A workaround is to access
case.client.customer_namedirectly in the template or modify the Python logic to populatecase.for_customer.
Some notes about this bug:
- this is reproduced in v2.4.20
- with a report template of type investigation
- here is a minimal template to reproduce the problem report_template.docx