{# #418: the dashboard's body: `tkt report overview --json`, or the refusal of a report that cannot run. Every chart is CSS bars (no script) and prints its numbers too; a segment opens the view it counts. Tones are `.tone-*` in ui.css. #426: the Coverage card (declared obligations) beside the relations matrix, its unmet rows in "Needs attention". #} {% from "_when.html" import when %} {% macro bar(segs, label) -%} {%- for s in segs if s.count %}{% if s.href %}{% else %}{% endif %}{% endfor -%} {%- endmacro %} {% if error %}

Run it yourself: {{ cmd }}

{% else %}
{% for t in tiles %}

{% if t.href %}{{ t.name }}{% else %}{{ t.name }}{% endif %}

{% if t.href %}{{ t.count }}{% else %}{{ t.count }}{% endif %}

{% if t.count and t.segs %} {{ bar(t.segs, t.segs | map(attribute='label') | join(' · ')) }}

{% for s in t.segs %}{% if s.href %}{{ s.label }}{% else %}{{ s.label }}{% endif %}{{ ' · ' if not loop.last }}{% endfor %}

{% elif t.count %}

{{ t.count }} in all

{% else %}

None yet.

{% endif %}
{% endfor %}

Tickets by type and status

{% if tickets.rows %}

{{ tickets.count }} tickets. A bar's length is the count of its type; a segment opens the tree with that type and status.

{% for s in tickets.legend %}{{ s.label }} {{ s.count }}{% endfor %}

{% for r in tickets.rows %}
{{ r.type }} {%- for s in r.segs %}{% endfor -%} {% if r.rest %}{% endif %} {{ r.count }}
{% endfor %}
As a table
{% for s in tickets.statuses %}{% endfor %}{% for r in tickets.rows %}{% for c in r.cells %}{% endfor %}{% endfor %}
type{{ s }}
{{ r.type }}{{ c }}
{% else %}

No tickets yet. Add one: tkt ticket new

{% endif %}

Needs attention

{% if attention %}
    {% for a in attention %}
  • {{ a.count }} {% if a.href %}{{ a.text }}{% else %}{{ a.text }}{% endif %} {% if a.cmd %}{{ a.cmd }}{% endif %} {% for i in a['items'] %}{% if i.href %}{{ i.id }}{% else %}{{ i.id }}{% endif %}{{ ', ' if not loop.last }}{% endfor %}{% if a.more %}, +{{ a.more }} more{% endif %}
  • {% endfor %}
{% else %}

Nothing needs attention: no blocked ticket, nothing past its target date, no open review, every declared obligation met.

{% endif %}

Relations between kinds

{{ report.relations.declared }} declared links, {{ report.relations.mentions }} text mentions besides. A row links to a column (a doc's affects runs doc → decision); a darker cell has more links; a cell names its fields on hover.

{% for k in matrix.kinds %}{% endfor %}{% for r in matrix.rows %} {%- for c in r.cells %}{% endfor %}{% endfor %}
from ↓ to →{{ k }}
{{ r.kind }}{{ c.count if c.count else '·' }}

fewer{% for n in range(1, 5) %}{% endfor %}more links

Coverage

{% if coverage %}

Open items that meet each obligation their type declares, counted as each item's read counts it. A bar opens the view of its items.

{% for c in coverage %}
{{ c.name }} {{ c.met }} of {{ c.applicable }} {{ bar(c.segs, c.label) }}
{% endfor %}
As a table
{% for c in coverage %}{% endfor %}
kindobligationmetofnot met
{{ c.kind }}{{ c.obligation }}{{ c.met }}{{ c.applicable }} {% for i in c['items'] %}{% if i.href %}{{ i.id }}{% else %}{{ i.id }}{% endif %}{{ ', ' if not loop.last }}{% endfor %}
{% else %}

No open item has a declared obligation yet.

{% endif %}

No link at all

{% if unlinked %}

Items no declared link reaches or leaves.

    {% for u in unlinked %}
  • {{ u.count }} {{ u.name }}: {% for i in u['items'] %}{% if i.href %}{{ i.id }}{% else %}{{ i.id }}{% endif %}{{ ', ' if not loop.last }}{% endfor %}
  • {% endfor %}
{% else %}

Every item has at least one declared link.

{% endif %}

Tickets created and closed, last {{ activity.weeks | length }} weeks

created {{ activity.created }} closed {{ activity.closed }}

{% for w in activity.weeks %}{{ w.label }}{% endfor %}
As a table
{% for w in activity.weeks %}{% endfor %}
weekfromcreatedclosed
{{ w.week }}{{ w.start }}{{ w.created }}{{ w.closed }}

ISO weeks in the local zone, from each ticket's createdAt and closedAt.

Last changed

{% if recent %}
    {% for r in recent %}
  • {{ r.kind }} {% if r.href %}{{ r.id }}{% else %}{{ r.id }}{% endif %} {{ r.title }} {{ when(r.updatedAt, 'updated') }}
  • {% endfor %}
{% else %}

Nothing has recorded a change time yet.

{% endif %}
As JSON: {{ cmd }} --json
{{ report | tojson(indent=2) }}
{% endif %}