# HG changeset patch # User Bernhard Reiter # Date 1580377701 -3600 # Node ID a12301b219fa468a32aee90399294538f32cc46e # Parent 91aaf455c44ea3e0134ba8dd45f51c19dcb6d67e# Parent 623eb9e5b7ecaeb563df006a1f292322456a4d8f merge diff -r 623eb9e5b7ec -r a12301b219fa CHANGES --- a/CHANGES Thu Jan 09 18:02:46 2020 +0100 +++ b/CHANGES Thu Jan 30 10:48:21 2020 +0100 @@ -1,5 +1,9 @@ (unreleased) + * Add new templates/zeiterfassung-hierarchy1 for creating zeiterfassung.txt + output where users have used the project keys to record workpackages within + a zeiterfassung.txt file. It allows a use case where hierarchical project + keys are used. (Bernhard Reiter) * scripts/getan-daily-report: * improve summary output by printing the day first. (Bernhard Reiter) * fix reporting for a full year with ``-y``. (Tom Gottfried) diff -r 623eb9e5b7ec -r a12301b219fa README --- a/README Thu Jan 09 18:02:46 2020 +0100 +++ b/README Thu Jan 30 10:48:21 2020 +0100 @@ -246,8 +246,8 @@ Main development ---------------- -2018- Magnus Schieder -2014- Bernhard E. Reiter (current maintainer) +2018- Magnus Schieder (current maintainer) +2014- Bernhard E. Reiter 2011-2014 Björn Ricks 2010 Ingo Weinzierl 2009-2014 Thomas Arendsen Hein diff -r 623eb9e5b7ec -r a12301b219fa getan/templates/zeiterfassung-hierarchy1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/getan/templates/zeiterfassung-hierarchy1 Thu Jan 30 10:48:21 2020 +0100 @@ -0,0 +1,23 @@ +{#- using projects keys as zeiterfassungs workpackages +-#} +{%- for day, day_entries + in entries|sort(attribute='startisoday')|groupby('startisoday') -%} + {%- for project in projects -%} + {%- for project_id, project_day_entries + in day_entries|sort(attribute='project_id')|groupby('project_id') %} + + {%- if project_id == project.id -%} +{{ day }} {{ (project_day_entries|duration|human_time).rjust(5) + }}h a {{ user.ljust(3) }} [{{ project.key }}] + {%- for entry in project_day_entries -%} + {%- if loop.index == 1 -%}{{ ' ' }} + {%- else -%}{{ ';\n ' }} + {%- endif -%} + {{ entry.get_comment() }} + {%- endfor %}{{'\n'}} + {%- endif -%} + {%- endfor -%} + {%- endfor -%} +# d total: {{ (day_entries|duration|human_time).rjust(5) }}h + +{% endfor -%}