changeset 541:a12301b219fa

merge
author Bernhard Reiter <bernhard@intevation.de>
date Thu, 30 Jan 2020 10:48:21 +0100
parents 91aaf455c44e (diff) 623eb9e5b7ec (current diff)
children 525ac205dca2
files CHANGES
diffstat 3 files changed, 29 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- 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)
--- 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 <magnus.schieder@intevation.de>
-2014-     Bernhard E. Reiter <bernhard@intevation.de> (current maintainer)
+2018-     Magnus Schieder <magnus.schieder@intevation.de> (current maintainer)
+2014-     Bernhard E. Reiter <bernhard@intevation.de>
 2011-2014 Björn Ricks <bjoern.ricks@intevation.de>
 2010      Ingo Weinzierl <ingo.weinzierl@intevation.de>
 2009-2014 Thomas Arendsen Hein <thomas@intevation.de>
--- /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 -%}
This site is hosted by Intevation GmbH (Datenschutzerklärung und Impressum | Privacy Policy and Imprint)