CSV export: store duration/effort as minutes
This commit is contained in:
parent
608b75f1c8
commit
5b2b28da19
2 changed files with 2 additions and 1 deletions
|
@ -248,7 +248,7 @@ Export of work data
|
||||||
>>> output = reportView()
|
>>> output = reportView()
|
||||||
>>> print output
|
>>> print output
|
||||||
Day;Start;End;Task;Party;Title;LA;Effort;State
|
Day;Start;End;Task;Party;Title;LA;Effort;State
|
||||||
08/12/28;19:00;20:15;loops Development;john;;;0.2500;finished
|
08/12/28;19:00;20:15;loops Development;john;;;15;finished
|
||||||
|
|
||||||
|
|
||||||
Meeting Minutes
|
Meeting Minutes
|
||||||
|
|
|
@ -85,6 +85,7 @@ class DurationField(Field):
|
||||||
def getExportValue(self, row, format, lang):
|
def getExportValue(self, row, format, lang):
|
||||||
value = self.getValue(row)
|
value = self.getValue(row)
|
||||||
if format == 'csv':
|
if format == 'csv':
|
||||||
|
return '%i' % round(value * 60)
|
||||||
locale = locales.getLocale(lang)
|
locale = locales.getLocale(lang)
|
||||||
fmt = locale.numbers.getFormatter('decimal')
|
fmt = locale.numbers.getFormatter('decimal')
|
||||||
return fmt.format(value, pattern=u'0.0000;-0.0000')
|
return fmt.format(value, pattern=u'0.0000;-0.0000')
|
||||||
|
|
Loading…
Add table
Reference in a new issue