iris-web icon indicating copy to clipboard operation
iris-web copied to clipboard

[BUG] case.for_customer Not Populating in Templates

Open WellKnitTech opened this issue 1 year ago • 1 comments

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:

  1. Create a new report template that includes the {{ case.for_customer }} variable.
  2. Populate the case with valid client information.
  3. Generate a report using the template.
  4. Observe that the case.for_customer variable 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_name is populated as part of the case dictionary, but case.for_customer is missing.
  • Documentation indicates case.for_customer should exist as a standard tag for templates.
  • A workaround is to access case.client.customer_name directly in the template or modify the Python logic to populate case.for_customer.

WellKnitTech avatar Jan 08 '25 22:01 WellKnitTech

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

c8y3 avatar May 14 '25 12:05 c8y3