{#- Backlog cards, refetched on backlog.* events. Expects: backlog_project (None: all projects), open_items, history, show_history, filter_qs. -#} {%- set base = "/p/" ~ backlog_project.slug ~ "/backlog" if backlog_project else "/backlog" %} {%- set view_qs = filter_qs ~ ("&history=1" if filter_qs and show_history else ("history=1" if show_history else "")) %} {%- set back = base ~ ("?" ~ view_qs if view_qs else "") %} {%- macro item(b, actions) -%}
#{{ b.id }}

{{ b.title }}

{% if b.kind %}{{ b.kind }}{% endif %} {% if not backlog_project %}{{ b.project_slug }}{% endif %} {% if b.area %}{{ b.area }}{% endif %} {% if b.priority %}priority {{ b.priority }}{% endif %} {% if b.assignee %}for {{ b.assignee }}{% endif %} {{ b.origin_text or b.origin }} {%- if b.origin_task_key %} · {{ b.origin_task_key }}{% if b.origin_task_stage %} {{ label(b.origin_task_stage) }}{% endif %}{% endif %} {%- if b.origin_session_name %} · {{ b.origin_session_name }}{% endif %} {%- if b.intake_message_id %} · message #{{ b.intake_message_id }}{% endif -%} {% if b.seen_at is none %}new{% endif %} {%- if b.status != "new" %} {{ b.status }}{% endif %} {%- if b.task_key %} {{ b.task_key }}{% endif %} {%- if b.duplicate_of %} duplicate of #{{ b.duplicate_of }} {%- elif b.status in ("declined", "done") and b.decline_reason %} {{ b.decline_reason }}{% endif %} {%- if b.status == "done" and b.link %} {{ b.link }}{% endif %}
{% if b.location %}

at {{ b.location }}

{% endif %} {% if b.triage_note %}

note: {{ b.triage_note }}

{% endif %} {#- The body of an item from 0.11's intake is external text: plain text, never markdown. #} {% if b.body_md %}
what{% if b.origin == "intake" %}

{{ b.body_md }}

{% else %}
{{ b.body_md|markdown }}
{% endif %}
{% endif %} {% if actions %}
{% if b.status != "later" %}
{% endif %}
Done
Not doing
{% endif %}
{%- endmacro %}
{% if open_items %}
{% for b in open_items %}{{ item(b, True) }}{% endfor %}
{% else %}

Nothing open on the backlog.

{% endif %} {% if history %}

Planned, done and declined {{ history|length }}

{% for b in history %}{{ item(b, False) }}{% endfor %}
{% endif %}