changeset 566:5ee84c9805f9

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.
author Bernhard Reiter <bernhard@intevation.de>
date Tue, 01 Jun 2021 16:02:55 +0200
parents 2c6ff55be046
children 1d4c20db7eac
files getan/templates/zeiterfassung2
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- 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 -%}{{ ' ' }}
This site is hosted by Intevation GmbH (Datenschutzerklärung und Impressum | Privacy Policy and Imprint)