Skip to content

Commit 799f91c

Browse files
author
Richard Jones
committed
Lots of little fixes in this update:
- fixed Date.local() - email quoted text stripping is controllable again [SF#650742] - extract attachment name from content-disposition if name missing [SF#637278] - removed FILTER_POSITION from bundled configs - reverse message listing in issue display (reversion of recent change) - bad entries for multilink editing in cgi don't traceback now [SF#640310]
1 parent b9ab821 commit 799f91c

File tree

12 files changed

+128
-25
lines changed

12 files changed

+128
-25
lines changed

CHANGES.txt

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,13 @@ are given with the most recent entry first.
99
- removed use of string/strop from TAL/TALInterpreter
1010
- handle KeyboardInterrupt nicely
1111
- fixed Date and Interval form value handling
12+
- fixed Date.local()
13+
- email quoted text stripping is controllable again (sf bug 650742)
14+
- extract attachment name from content-disposition if name is missing (sf
15+
bug 637278)
16+
- removed FILTER_POSITION from bundled configs
17+
- reverse message listing in issue display (reversion of recent change)
18+
- bad entries for multilink editing in cgi don't traceback now (sf bug 640310)
1219

1320

1421
2002-11-07 0.5.2

TODO.txt

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@ pending hyperdb range searching of values (dates in particular).
1616
[value, value, ...] implies "in"
1717
pending hyperdb migrate "id" property to be Number type
1818
pending hyperdb multilink sorting by length is dumb
19+
pending hyperdb lastchangedby auto-property giving last user to change an
20+
item
1921
pending tracker split instance.open() into open() and login()
2022
pending mailgw allow commands (feature request #556996)
2123
like "help", "dump issue123" (would send all info about
@@ -33,6 +35,8 @@ pending mailgw Identification of users should have a configurable degree of
3335
strictness (ie. turn off username==address matching)
3436
pending mailgw Use in-reply-to for determining message lineage when subject
3537
line lets us down
38+
pending mailgw Allow different brackets delimiting [issueNNN] in Subject
39+
pending email email sig could use a "remove me from this list"
3640
pending messages Snarf the first whole sentence, or full first line of
3741
messages for the summary - whichever is longer.
3842
pending project switch to a Roundup instance for Roundup bug/feature tracking
@@ -56,14 +60,18 @@ pending web allow multilink selections to select a "none" element to allow
5660
pending web automagically link designators
5761
pending web add checkbox-based removal/addition for multilink entries
5862
(eg "add me"/"remove me" for nosy list)
59-
pending web multilink item removal action (with retirement)
6063
pending web search "refinement" - pre-fill the search page with the
6164
current search parameters
6265
pending web column-heading sort stuff isn't implemented
66+
pending web multilink item removal action with retirement
67+
pending web implement a python dict version of the form values
6368

6469
active web UNIX init.d script for roundup-server
6570
bug web query editing isn't fully implemented
6671
bug web no testing for parsePropsFromForm
6772
active web revert to showing entire message in classic issue display
73+
bug hyperdb pysqlite and locks
74+
http://www.hwaci.com/sw/sqlite/c_interface.html
75+
bug web implement the request.url attribute?
6876
======= ========= =============================================================
6977

doc/customizing.txt

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
Customising Roundup
33
===================
44

5-
:Version: $Revision: 1.63 $
5+
:Version: $Revision: 1.64 $
66

77
.. This document borrows from the ZopeBook section on ZPT. The original is at:
88
http://www.zope.org/Documentation/Books/ZopeBook/current/ZPT.stx
@@ -1486,6 +1486,10 @@ the "status" and "topic" properties, and the table includes columns for the
14861486
Searching Views
14871487
---------------
14881488

1489+
Note: if you add a new column to the ``:columns`` form variable potentials
1490+
then you will need to add the column to the `index view`_
1491+
template so it is actually displayed.
1492+
14891493
This is one of the class context views. The template used is typically
14901494
"*classname*.search". The form on this page should have "search" as its
14911495
``:action`` variable. The "search" action:
@@ -1515,7 +1519,6 @@ action are:
15151519
template schema does not.
15161520

15171521

1518-
15191522
Item Views
15201523
----------
15211524

roundup/__init__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
# BASIS, AND THERE IS NO OBLIGATION WHATSOEVER TO PROVIDE MAINTENANCE,
1616
# SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
1717
#
18-
# $Id: __init__.py,v 1.16 2002-11-06 11:38:42 richard Exp $
18+
# $Id: __init__.py,v 1.17 2002-12-10 00:11:14 richard Exp $
1919

2020
''' Roundup - issue tracking for knowledge workers.
2121
@@ -67,6 +67,6 @@
6767
much prettier cake :)
6868
'''
6969

70-
__version__ = '0.5.2'
70+
__version__ = '0.5.3'
7171

7272
# vim: set filetype=python ts=4 sw=4 et si

roundup/cgi/client.py

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# $Id: client.py,v 1.58 2002-11-28 07:08:39 richard Exp $
1+
# $Id: client.py,v 1.59 2002-12-10 00:11:15 richard Exp $
22

33
__doc__ = """
44
WWW request handler (also used in the stand-alone server).
@@ -691,7 +691,7 @@ def editItemAction(self):
691691
props = self._changenode(props)
692692
# handle linked nodes
693693
self._post_editnode(self.nodeid)
694-
except (ValueError, KeyError), message:
694+
except (ValueError, KeyError, IndexError), message:
695695
self.error_message.append(_('Error: ') + str(message))
696696
return
697697

@@ -771,7 +771,19 @@ def newItemAction(self):
771771
try:
772772
# do the create
773773
nid = self._createnode(props)
774+
except (ValueError, KeyError, IndexError), message:
775+
# these errors might just be indicative of user dumbness
776+
self.error_message.append(_('Error: ') + str(message))
777+
return
778+
except:
779+
# oops
780+
self.db.rollback()
781+
s = StringIO.StringIO()
782+
traceback.print_exc(None, s)
783+
self.error_message.append('<pre>%s</pre>'%cgi.escape(s.getvalue()))
784+
return
774785

786+
try:
775787
# handle linked nodes
776788
self._post_editnode(nid)
777789

@@ -783,9 +795,6 @@ def newItemAction(self):
783795

784796
# and some nice feedback for the user
785797
message = _('%(classname)s created ok')%self.__dict__ + xtra
786-
except (ValueError, KeyError), message:
787-
self.error_message.append(_('Error: ') + str(message))
788-
return
789798
except:
790799
# oops
791800
self.db.rollback()

roundup/cgi/templating.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -891,6 +891,12 @@ def pretty(self, format='%d %B %Y'):
891891
'''
892892
return self._value.pretty()
893893

894+
def local(self, offset):
895+
''' Return the date/time as a local (timezone offset) date/time.
896+
'''
897+
return DateHTMLProperty(self._client, self._nodeid, self._prop,
898+
self._name, self._value.local())
899+
894900
class IntervalHTMLProperty(HTMLProperty):
895901
def plain(self):
896902
''' Render a "plain" representation of the property
@@ -965,6 +971,7 @@ def field(self, showid=0, size=None):
965971
else:
966972
s = ''
967973
l.append(_('<option %svalue="-1">- no selection -</option>')%s)
974+
# XXX if the current value is retired, then list it explicitly
968975
for optionid in options:
969976
# get the option value, and if it's None use an empty string
970977
option = linkcl.get(optionid, k) or ''
@@ -1011,6 +1018,7 @@ def menu(self, size=None, height=None, showid=0, additional=[],
10111018
else:
10121019
sort_on = ('+', linkcl.labelprop())
10131020
options = linkcl.filter(None, conditions, sort_on, (None, None))
1021+
# XXX if the current value is retired, then list it explicitly
10141022
for optionid in options:
10151023
# get the option value, and if it's None use an empty string
10161024
option = linkcl.get(optionid, k) or ''
@@ -1131,6 +1139,7 @@ def menu(self, size=None, height=None, showid=0, additional=[],
11311139
height = height or min(len(options), 7)
11321140
l = ['<select multiple name="%s" size="%s">'%(self._name, height)]
11331141
k = linkcl.labelprop(1)
1142+
# XXX if any of the current values are retired, then list them
11341143
for optionid in options:
11351144
# get the option value, and if it's None use an empty string
11361145
option = linkcl.get(optionid, k) or ''

roundup/mailgw.py

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ class node. Any parts of other types are each stored in separate files
7373
an exception, the original message is bounced back to the sender with the
7474
explanatory message given in the exception.
7575
76-
$Id: mailgw.py,v 1.99 2002-11-05 22:59:46 richard Exp $
76+
$Id: mailgw.py,v 1.100 2002-12-10 00:11:15 richard Exp $
7777
'''
7878

7979
import string, re, os, mimetools, cStringIO, smtplib, socket, binascii, quopri
@@ -723,7 +723,11 @@ def handle_message(self, message):
723723
attachments.append((name, 'message/rfc822', part.fp.read()))
724724
else:
725725
# try name on Content-Type
726-
name = part.getparam('name')
726+
name = part.getparam('name').strip()
727+
if not name:
728+
disp = part.getheader('content-disposition', None)
729+
if disp:
730+
name = disp.getparam('filename').strip()
727731
# this is just an attachment
728732
data = self.get_part_data_decoded(part)
729733
attachments.append((name, part.gettype(), data))
@@ -761,9 +765,9 @@ def handle_message(self, message):
761765
content = self.get_part_data_decoded(message)
762766

763767
# figure how much we should muck around with the email body
764-
keep_citations = getattr(self.instance, 'EMAIL_KEEP_QUOTED_TEXT',
768+
keep_citations = getattr(self.instance.config, 'EMAIL_KEEP_QUOTED_TEXT',
765769
'no') == 'yes'
766-
keep_body = getattr(self.instance, 'EMAIL_LEAVE_BODY_UNCHANGED',
770+
keep_body = getattr(self.instance.config, 'EMAIL_LEAVE_BODY_UNCHANGED',
767771
'no') == 'yes'
768772

769773
# parse the body of the message, stripping out bits as appropriate

roundup/templates/classic/config.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
# BASIS, AND THERE IS NO OBLIGATION WHATSOEVER TO PROVIDE MAINTENANCE,
1616
# SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
1717
#
18-
# $Id: config.py,v 1.4 2002-11-07 21:17:44 richard Exp $
18+
# $Id: config.py,v 1.5 2002-12-10 00:11:16 richard Exp $
1919

2020
import os
2121

@@ -47,9 +47,6 @@
4747
# The email address that roundup will complain to if it runs into trouble
4848
ADMIN_EMAIL = 'roundup-admin@%s'%MAIL_DOMAIN
4949

50-
# Where to place the web filtering HTML on the index page
51-
FILTER_POSITION = 'bottom' # one of 'top', 'bottom', 'top and bottom'
52-
5350
#
5451
# SECURITY DEFINITIONS
5552
#

roundup/templates/classic/html/issue.item

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ python:db.user.classhelp('username,realname,address,phone')" /><br>
128128

129129
<table class="messages" tal:condition="context/messages">
130130
<tr><th colspan="4" class="header">Messages</th></tr>
131-
<tal:block tal:repeat="msg context/messages">
131+
<tal:block tal:repeat="msg context/messages/reverse">
132132
<tr>
133133
<th><a tal:attributes="href string:msg${msg/id}"
134134
tal:content="string:msg${msg/id}"></a></th>

roundup/templates/minimal/config.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
# BASIS, AND THERE IS NO OBLIGATION WHATSOEVER TO PROVIDE MAINTENANCE,
1616
# SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
1717
#
18-
# $Id: config.py,v 1.2 2002-11-07 21:17:44 richard Exp $
18+
# $Id: config.py,v 1.3 2002-12-10 00:11:16 richard Exp $
1919

2020
import os
2121

@@ -47,9 +47,6 @@
4747
# The email address that roundup will complain to if it runs into trouble
4848
ADMIN_EMAIL = 'roundup-admin@%s'%MAIL_DOMAIN
4949

50-
# Where to place the web filtering HTML on the index page
51-
FILTER_POSITION = 'bottom' # one of 'top', 'bottom', 'top and bottom'
52-
5350
#
5451
# SECURITY DEFINITIONS
5552
#

0 commit comments

Comments
 (0)