{% macro task_row(task, indent) %}
{% if task.parent_task %} {% endif %} {{ task.subject }}
{{ task.status }}
{% if task.exp_end_date %} {{ task.exp_end_date }} {% else %} -- {% endif %}
{% if task["_assign"] %} {% set assigned_users = json.loads(task["_assign"])%} {% for user in assigned_users %} {% set user_details = frappe.db.get_value("User", user, ["full_name", "user_image"], as_dict = True)%} {% if user_details.user_image %} {% else %}
{{ frappe.utils.get_abbr(user_details.full_name) }}
{% endif %} {% endfor %} {% endif %}
{{ frappe.utils.pretty_date(task.modified) }}
{% if task.children %} {% for child in task.children %} {{ task_row(child, indent + 30) }} {% endfor %} {% endif %} {% endmacro %} {% for task in doc.tasks %}
{{ task_row(task, 0) }}
{% endfor %}