# HG changeset patch # User Bernhard Reiter # Date 1622556175 -7200 # Node ID 5ee84c9805f9ba1b61215a2f8ab4f27a6294ada4 # Parent 2c6ff55be046e4850f7042eb14720e33162f4871 improve templates/zeiterfassung2 to sort better `zeiterfassung2` groups several entries for one workpackage into one zeiterfassungs.txt entry, adding a sorting by starttime makes the entry more naturally readable. diff -r 2c6ff55be046 -r 5ee84c9805f9 getan/templates/zeiterfassung2 --- a/getan/templates/zeiterfassung2 Mon Sep 28 15:07:32 2020 +0200 +++ b/getan/templates/zeiterfassung2 Tue Jun 01 16:02:55 2021 +0200 @@ -4,7 +4,7 @@ {% for grouper, gentries in proj.entries|sort(attribute='startisoday')|groupby('startisoday') %} {#- grouper will contain the attribute used for groupby() -#} -{% for ggrouper, ggentries in gentries|groupby('workpackage') %} +{% for ggrouper, ggentries in gentries|sort(attribute='start')|groupby('workpackage') %} {{ gentries[0].start|date_format }} {{ (ggentries|duration|human_time).rjust(5) }}h a {{ user.ljust(3) }} [{{ ggrouper }}] {%- for entry in ggentries -%} {%- if loop.index == 1 -%}{{ ' ' }}