Skip to content

Commit de385bf

Browse files
author
Richard Jones
committed
Bug fixes:
. Fixed bug in re generation in the filter (I hadn't finished the code ;) . Added TODO as a priority (between bug and usability) . Fixed handling of None String property in grouped list headings
1 parent 2af8325 commit de385bf

File tree

7 files changed

+29
-16
lines changed

7 files changed

+29
-16
lines changed

CHANGES

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,8 @@
2424
properties, etc.
2525
. Set the default index to sort on activity
2626

27-
2001-07-XX - 0.1.3
27+
28+
2001-07-19 - 0.1.3
2829
. Reldate now takes an argument "pretty" - when true, it pretty-prints the
2930
interval generated up to 5 days, then pretty-prints the date of last
3031
activity. The issue index and item now use the pretty format.
@@ -43,3 +44,9 @@
4344
te*xt - search for text matching "te"<any characters>"xt"
4445
te?xt - search for text matching "te"<any one character>"xt"
4546
. Added more fields to the issue.filter and issue.index templates
47+
48+
49+
2001-07-19 - 0.1.4
50+
. Fixed bug in re generation in the filter (I hadn't finished the code ;)
51+
. Added TODO as a priority (between bug and usability)
52+
. Fixed handling of None String property in grouped list headings

Makefile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@ release:
1111
mkdir /tmp/${PACKAGE}
1212
cp -r ${FILES} /tmp/${PACKAGE}
1313
cp dummy_config.py /tmp/${PACKAGE}
14-
(cd /tmp; tar zcf ${PACKAGE}.tgz ${PACKAGE})
15-
mv /tmp/${PACKAGE}.tgz .
14+
(cd /tmp; tar zcf ${PACKAGE}.tar.gz ${PACKAGE})
15+
mv /tmp/${PACKAGE}.tar.gz .
1616

1717
clean:
18-
rm -f *.pyc *.tgz
18+
rm -f *.pyc *.tar.gz

config.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
ADMIN_EMAIL = "[email protected]"
99

1010
# The SMTP mail host that roundup will use to send mail
11-
MAILHOST = 'goanna.adroit.net'
11+
MAILHOST = 'dirk'
1212

1313
# Somewhere for roundup to log stuff internally sent to stdout or stderr
1414
LOG = '/home/httpd/html/roundup/roundup.log'

hyperdb.py

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -648,8 +648,9 @@ def filter(self, filterspec, sort, group, num_re = re.compile('^\d+$')):
648648
v = v[0]
649649
if '*' in v or '?' in v:
650650
# simple glob searching
651-
v = v.replace(v, '?', '.')
652-
v = v.replace(v, '*', '.*?')
651+
v = v.replace('?', '.')
652+
v = v.replace('*', '.*?')
653+
v = re.compile(v)
653654
l.append((2, k, v))
654655
elif v[0] == '^':
655656
# start-anchored
@@ -690,7 +691,7 @@ def filter(self, filterspec, sort, group, num_re = re.compile('^\d+$')):
690691
else:
691692
continue
692693
break
693-
elif t == 2 and not v.match(node[k]):
694+
elif t == 2 and not v.search(node[k]):
694695
# RE search
695696
break
696697
elif t == 3 and node[k][:len(v)] != v:
@@ -748,10 +749,10 @@ def sortfun(a, b, sort=sort, group=group, properties=self.getprops(),
748749

749750
# String and Date values are sorted in the natural way
750751
if propclass.isStringType:
751-
# make sure that case doesn't get involved
752-
if av[0] in string.uppercase:
752+
# clean up the strings
753+
if av and av[0] in string.uppercase:
753754
av = an[prop] = av.lower()
754-
if bv[0] in string.uppercase:
755+
if bv and bv[0] in string.uppercase:
755756
bv = bn[prop] = bv.lower()
756757
if propclass.isStringType or propclass.isDateType:
757758
if dir == '+':

roundup_cgi.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -212,11 +212,12 @@ def showitem(self, message=None):
212212
props[key] = value
213213
cl.set(self.nodeid, **props)
214214

215-
# if this item has messages,
215+
# if this item has messages, generate an edit message
216+
# TODO: don't send the edit message to the person who
217+
# performed the edit
216218
if (cl.getprops().has_key('messages') and
217219
cl.getprops()['messages'].isMultilinkType and
218220
cl.getprops()['messages'].classname == 'msg'):
219-
# generate an edit message - nosyreactor will send it
220221
nid = self.nodeid
221222
m = []
222223
for name, prop in cl.getprops().items():

roundupdb.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -329,8 +329,9 @@ def initDB(storagelocator, password):
329329
pri = db.getclass('priority')
330330
pri.create(name="fatal-bug", order="1")
331331
pri.create(name="bug", order="2")
332-
pri.create(name="usability", order="3")
333-
pri.create(name="feature", order="4")
332+
pri.create(name="todo", order="3")
333+
pri.create(name="usability", order="4")
334+
pri.create(name="feature", order="5")
334335

335336
stat = db.getclass('status')
336337
stat.create(name="unread", order="1")

template.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -506,7 +506,10 @@ def index(fp, db, classname, filterspec={}, filter=[], columns=[], sort=[],
506506
for value in cl.get(nodeid, name):
507507
l.append(group_cl.get(value, key))
508508
else:
509-
l.append(cl.get(nodeid, name))
509+
value = cl.get(nodeid, name)
510+
if value is None:
511+
value = '[empty %s]'%name
512+
l.append(value)
510513
w('<tr class="list-header">'
511514
'<td align=left colspan=%s><strong>%s</strong></td></tr>'%(
512515
len(columns), ', '.join(l)))

0 commit comments

Comments
 (0)