Jinja print a task report with all comments

hi @ll,
could someone please give me a hint? I would like to add a loop below of the task report, which displays all comments, but I’m struggling with the “for” loop. just the loop or maybe the link to the documentation, whatever you can provide :wink:

{%- for i in doc.comment -%} ← i tried many things, that’s the las one … so as mentioned above, if you don’t know howtodo it, but you know the link to the documention … is also ok to me (google did’nt help me in this case :frowning :frowning:

thanks and best regards
schmutzfuss

@schmutzfuss you trying to print a task or a report of tasks ?

ohh …
i want to change the print … (report)? …
opening a task, click on print (that document i customized)

@schmutzfuss try this :

{% set comments = frappe.db.get_all("Comment",filters={"reference_doctype":"Task","reference_name":doc.name},fields=["*"])%}
{% for c in comments %}
{{c["content"]}}
{% endfor %}
1 Like

:slight_smile: :slight_smile: :slight_smile:

many many thanks