{% extends "ui/templates/base/layout.html" %} {% block content %}

Firm Task Templates

{{ service.service_code }} · {{ service.service_name }} {% if selection and selection.default_branch_id %} · Default Branch ID {{ selection.default_branch_id }}{% endif %}

{% if request.query_params.get('requirement_added') %}
Document requirement added successfully.
{% endif %} {% if request.query_params.get('template_uploaded') %}
Template file uploaded successfully.
{% endif %} {% if request.query_params.get('error') %}
Action failed. Please check the selected task, file and permissions.
{% endif %} {% if request.query_params.get('moved') %}
Task sequence updated. Use Sync Firm Tasks to Open Engagements if you want safe pending/open task snapshots refreshed.
{% endif %} {% if request.query_params.get('move_error') %}
Task could not be moved.
{% endif %} {% if request.query_params.get('imported') %}
Excel import completed: {{ request.query_params.get('created','0') }} created, {{ request.query_params.get('updated','0') }} updated.
{% endif %} {% if request.query_params.get('import_error') %}
Excel import failed validation. No partial update was committed.
{% endif %} {% if request.query_params.get('system_upgraded') %}
System update applied to the firm task. Safe unstarted tasks in open engagements were refreshed automatically.
{% endif %} {% if request.query_params.get('system_kept') %}
Firm customization retained for this system revision. You will be prompted again when the system default changes in a later revision.
{% endif %} {% if request.query_params.get('sync_success') %}
System defaults synchronized: {{ request.query_params.get('created','0') }} created, {{ request.query_params.get('updated','0') }} updated, {{ request.query_params.get('custom_updates','0') }} customized task(s) awaiting review.
{% endif %} {% if can_manage_tasks %}

Export · Edit · Re-import Firm Tasks

Use the exported workbook for this service. Re-import updates by service code + sequence number and preserves all other ERP features.

{% endif %}
Firm Status
{{ 'Enabled' if selection and selection.is_enabled else 'Not Enabled' }}

Firm-level service selection controls whether these task templates are used.

Firm Tasks
{{ task_templates|length }}

Tasks customised for the active firm.

System Defaults
{{ default_tasks|length }}

Inherited defaults stay synchronized automatically; customized tasks require Firm Admin approval before a later system update is applied.

{% if can_manage_tasks %}

Add Firm Task

Create a task template for this firm and service.

{% if default_tasks|length > 0 %}
{% endif %}
Eligible Roles
{% for role in task_execution_roles %} {% endfor %}
AQMM / Quality Control Tagging

Tick only the service checklist tasks that should form part of assurance engagement quality evidence.

{% endif %} {% if request.query_params.get('synced') %}
Open engagement sync completed: {{ request.query_params.get('created', '0') }} missing task(s) added, {{ request.query_params.get('updated_pending', '0') }} pending task(s) refreshed, {{ request.query_params.get('updated_started', '0') }} started task assignee(s) refreshed, {{ request.query_params.get('preserved', '0') }} historical/unsafe task(s) preserved.
{% endif %} {% if can_manage_tasks %}

Sync Firm Tasks to Open Engagements

Adds missing active tasks and refreshes pending/not-started role and assignee. Completed tasks, evidence, comments, review history and locked engagements are preserved.

{% endif %}

Firm Task List

These tasks will be used when work is generated for this firm.

{% for task in task_templates %} {% else %} {% endfor %}
Seq Task Role Flags Document Requirements Template Uploads
{{ task.sequence_no }} {% if can_manage_tasks %}
{% endif %}
{{ task.task_name }}
{% if task.source_system_task_id %} {% if task.is_customized %}Customized{% else %}System inherited{% endif %} {% else %} Firm-only {% endif %} {% if task.system_update_available %}System update available{% endif %}
{% if task.system_update_available %} {% set changes = system_update_diff_map.get(task.id, []) if system_update_diff_map else [] %}
A newer system default is available. Your firm customization has not been overwritten.
{% if changes %}
{% for change in changes[:5] %}
{{ change.label }}: {{ change.firm if change.firm is not none else '-' }} → {{ change.system if change.system is not none else '-' }}
{% endfor %} {% if changes|length > 5 %}
+ {{ changes|length - 5 }} more change(s)
{% endif %}
{% endif %} {% if can_manage_tasks %}
{% endif %}
{% endif %} {% if task.task_category %}
Category: {{ task.task_category }}
{% endif %} {% if task.description %}
{{ task.description }}
{% endif %}
{{ task.default_role_name or '-' }}
Eligible: {{ task.eligible_role_names or task.default_role_name or '-' }}
{% if task.task_category %}{{ task.task_category }}{% endif %}{% if task.task_tool_code and task.task_tool_code != "NONE" %}Tool: {{ task.task_tool_code|replace("_"," ")|title }}{% endif %} {% if task.is_mandatory %}Mandatory{% endif %} {% if task.requires_review %}Review: {{ (task.normal_review_role or "manager").replace("_"," ").title() }}{% endif %} {% if task.is_aqmm_task %}AQMM{% endif %} {% if task.aqmm_mandatory %}AQMM Mandatory{% endif %} {% if task.aqmm_evidence_required %}Evidence{% endif %} {% if task.aqmm_blocks_final_release %}Final Gate{% endif %} {{ 'Active' if task.is_active else 'Inactive' }}
{% set reqs = task_requirement_map.get(task.id, []) if task_requirement_map else [] %}
{% for req in reqs %}
{{ req.document_name }}
{{ req.document_type.replace('_',' ').title() }} · {{ 'Mandatory' if req.is_mandatory else 'Optional' }} · {{ 'Active' if req.is_active else 'Inactive' }}
{% if can_manage_tasks %}
{% endif %}
{% else %}No requirements{% endfor %}
{% if can_manage_tasks %}
{% endif %}
{% set files = task_template_file_map.get(task.id, []) if task_template_file_map else [] %}
{% for tpl in files %}
{{ tpl.template_name }}
{{ tpl.template_category or 'Template' }} · {{ tpl.original_filename }}
{% else %}No template files{% endfor %}
{% if can_manage_tasks %}
{% endif %}
{% if can_manage_tasks %}
Edit
{% endif %}
No firm task templates yet. Copy defaults or add tasks manually.
{% endblock %}