Skip to content

Commit

Permalink
fixed field sorting in email
Browse files Browse the repository at this point in the history
  • Loading branch information
Dr. Frank Hoffmann authored and Dr. Frank Hoffmann committed May 27, 2019
1 parent d2ef6cb commit a8374d2
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 16 deletions.
8 changes: 4 additions & 4 deletions conf/zms3.formulator.metaobj.xml
Original file line number Diff line number Diff line change
Expand Up @@ -675,7 +675,7 @@ $ZMI.registerReady(function() {
<item key="id"><![CDATA[ZMSFormulator]]></item>
<item key="name"><![CDATA[ZMSFormulator]]></item>
<item key="package"><![CDATA[zms3.formulator]]></item>
<item key="revision"><![CDATA[3.4.15]]></item>
<item key="revision"><![CDATA[3.4.16]]></item>
<item key="type"><![CDATA[ZMSDocument]]></item>
</dictionary>
</item>
Expand Down Expand Up @@ -1214,7 +1214,7 @@ textarea.form-control.rawJSON {
<item key="id"><![CDATA[ZMSFormulatorItem]]></item>
<item key="name"><![CDATA[ZMSFormulatorItem]]></item>
<item key="package"><![CDATA[zms3.formulator]]></item>
<item key="revision"><![CDATA[3.4.15]]></item>
<item key="revision"><![CDATA[3.4.16]]></item>
<item key="type"><![CDATA[ZMSObject]]></item>
</dictionary>
</item>
Expand Down Expand Up @@ -1246,7 +1246,7 @@ textarea.form-control.rawJSON {
<item key="enabled" type="int">0</item>
<item key="id"><![CDATA[zms3.formulator]]></item>
<item key="name"><![CDATA[zms3.formulator]]></item>
<item key="revision"><![CDATA[3.4.15]]></item>
<item key="revision"><![CDATA[3.4.16]]></item>
<item key="type"><![CDATA[ZMSPackage]]></item>
</dictionary>
</item>
Expand Down Expand Up @@ -1524,7 +1524,7 @@ def downloadData(self):
<item key="id"><![CDATA[zms3.formulator.lib]]></item>
<item key="name"><![CDATA[zms3.formulator.lib]]></item>
<item key="package"><![CDATA[zms3.formulator]]></item>
<item key="revision"><![CDATA[3.4.15]]></item>
<item key="revision"><![CDATA[3.4.16]]></item>
<item key="type"><![CDATA[ZMSLibrary]]></item>
</dictionary>
</item>
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
else:
site_packages = get_python_lib()

VERSION = '3.4.15'
VERSION = '3.4.16'

zmspkg_name = 'formulator'
branch_name = 'master'
Expand Down
30 changes: 19 additions & 11 deletions zms3/formulator/ZMSFormulator.py
Original file line number Diff line number Diff line change
Expand Up @@ -379,25 +379,33 @@ def printDataRaw(self, receivedData=None, frmt='txt'):
if isinstance(receivedData, dict):
data = receivedData

# Handle ZODB-Dictionary
# Handle ZODB-Dictionary and REQUEST-Data
if isinstance(data, dict):
if frmt=='txt':
s = '%s entries:\n\n'%len(data)

# data values
if len(data) > 0:
header.extend( [ i[0] for i in data[data.keys()[0]] ] )
s += '#/#'.join(header).upper() +'\n'
s1 = ''
sorted_v = {}
for t, v in sorted(data.iteritems()):
output = []
output.append(time.strftime('%Y-%m-%d %H:%M:%S', time.localtime(t)))
sorted_v = sorted(v)
for i in sorted_v:
i1, i2 = i
outstr = self.this.str_item(i2)
outstr = outstr.replace('\n',', ')
output.append(_globals.html_quote(outstr))
s1 += '#/#'.join(output) + '\n'

for t, v in sorted(data.iteritems()):
output = []
output.append(time.strftime('%Y-%m-%d %H:%M:%S', time.localtime(t)))
# data header
s0 = ''
for i in sorted(v):
i1, i2 = i
outstr = self.this.str_item(i2)
outstr = outstr.replace('\n',', ')
output.append(_globals.html_quote(outstr))
s += '#/#'.join(output) + '\n'

header.append(i1)
s0 += '#/#'.join(header).upper() +'\n'
s = s0 + s1

# Handle SQL-Storage
else:
Expand Down

0 comments on commit a8374d2

Please sign in to comment.