Code

. Fixed bug in re generation in the filter (I hadn't finished the code ;)
authorrichard <richard@57a73879-2fb5-44c3-a270-3262357dd7e2>
Thu, 19 Jul 2001 05:23:09 +0000 (05:23 +0000)
committerrichard <richard@57a73879-2fb5-44c3-a270-3262357dd7e2>
Thu, 19 Jul 2001 05:23:09 +0000 (05:23 +0000)
 . Added TODO as a priority (between bug and usability)
 . Fixed handling of None String property in grouped list headings

git-svn-id: http://svn.roundup-tracker.org/svnroot/roundup/trunk@7 57a73879-2fb5-44c3-a270-3262357dd7e2

CHANGES
Makefile
config.py
hyperdb.py
roundup_cgi.py
roundupdb.py
template.py

diff --git a/CHANGES b/CHANGES
index 9a35d1c022b4b7a8d74a12fe2ff873f85e9c88b1..d893fc16137206f63354101a81006b8777c8e75d 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -24,7 +24,8 @@
    properties, etc.
  . Set the default index to sort on activity
 
-2001-07-XX - 0.1.3
+
+2001-07-19 - 0.1.3
  . Reldate now takes an argument "pretty" - when true, it pretty-prints the
    interval generated up to 5 days, then pretty-prints the date of last
    activity. The issue index and item now use the pretty format.
@@ -43,3 +44,9 @@
     te*xt  - search for text matching "te"<any characters>"xt"
     te?xt  - search for text matching "te"<any one character>"xt"
  . Added more fields to the issue.filter and issue.index templates
+
+
+2001-07-19 - 0.1.4
+ . 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
index b662ffcf052073d2d6ac652070f8b031cb356df1..ac26c1513823761ee8b62d69062070d125adb497 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -11,8 +11,8 @@ release:
        mkdir /tmp/${PACKAGE}
        cp -r ${FILES} /tmp/${PACKAGE}
        cp dummy_config.py /tmp/${PACKAGE}
-       (cd /tmp; tar zcf ${PACKAGE}.tgz ${PACKAGE})
-       mv /tmp/${PACKAGE}.tgz .
+       (cd /tmp; tar zcf ${PACKAGE}.tar.gz ${PACKAGE})
+       mv /tmp/${PACKAGE}.tar.gz .
 
 clean:
-       rm -f *.pyc *.tgz
+       rm -f *.pyc *.tar.gz
index 1cc53654577d2078b024cafd51c9f503998e2084..8dafdc899b917a0a16e9005b91b5f6f3a1bffa7e 100644 (file)
--- a/config.py
+++ b/config.py
@@ -8,7 +8,7 @@ ISSUE_TRACKER_EMAIL = 'issue_tracker@bizarsoftware.com.au'
 ADMIN_EMAIL = "roundup-admin@bizarsoftware.com.au"
 
 # The SMTP mail host that roundup will use to send mail
-MAILHOST = 'goanna.adroit.net'
+MAILHOST = 'dirk'
 
 # Somewhere for roundup to log stuff internally sent to stdout or stderr
 LOG = '/home/httpd/html/roundup/roundup.log'
index dcd8522ab77e0c2ab53f2aacdff0a3ea41056784..c7684d3b1e00f732237507f1ffd43b5b0284e0cd 100644 (file)
@@ -648,8 +648,9 @@ class Class:
                 v = v[0]
                 if '*' in v or '?' in v:
                     # simple glob searching
-                    v = v.replace(v, '?', '.')
-                    v = v.replace(v, '*', '.*?')
+                    v = v.replace('?', '.')
+                    v = v.replace('*', '.*?')
+                    v = re.compile(v)
                     l.append((2, k, v))
                 elif v[0] == '^':
                     # start-anchored
@@ -690,7 +691,7 @@ class Class:
                     else:
                         continue
                     break
-                elif t == 2 and not v.match(node[k]):
+                elif t == 2 and not v.search(node[k]):
                     # RE search
                     break
                 elif t == 3 and node[k][:len(v)] != v:
@@ -748,10 +749,10 @@ class Class:
 
                     # String and Date values are sorted in the natural way
                     if propclass.isStringType:
-                        # make sure that case doesn't get involved
-                        if av[0] in string.uppercase:
+                        # clean up the strings
+                        if av and av[0] in string.uppercase:
                             av = an[prop] = av.lower()
-                        if bv[0] in string.uppercase:
+                        if bv and bv[0] in string.uppercase:
                             bv = bn[prop] = bv.lower()
                     if propclass.isStringType or propclass.isDateType:
                         if dir == '+':
index 43198333d33bccd1f678a9a159743a4eadacbfc1..2ca5fa7ed1d77c3d11ee75c14c98701e1cb3616e 100644 (file)
@@ -212,11 +212,12 @@ class Client:
                         props[key] = value
                 cl.set(self.nodeid, **props)
 
-                # if this item has messages, 
+                # if this item has messages, generate an edit message
+                # TODO: don't send the edit message to the person who
+                # performed the edit
                 if (cl.getprops().has_key('messages') and
                         cl.getprops()['messages'].isMultilinkType and
                         cl.getprops()['messages'].classname == 'msg'):
-                    # generate an edit message - nosyreactor will send it
                     nid = self.nodeid
                     m = []
                     for name, prop in cl.getprops().items():
index 96e62f8cab9b4f01914b96d59f699cf809e3db94..4e79832e0abfef7f5fd39691c0c9d3b6521a4ac5 100644 (file)
@@ -329,8 +329,9 @@ def initDB(storagelocator, password):
     pri = db.getclass('priority')
     pri.create(name="fatal-bug", order="1")
     pri.create(name="bug", order="2")
-    pri.create(name="usability", order="3")
-    pri.create(name="feature", order="4")
+    pri.create(name="todo", order="3")
+    pri.create(name="usability", order="4")
+    pri.create(name="feature", order="5")
 
     stat = db.getclass('status')
     stat.create(name="unread", order="1")
index 8b0e4ca4699ceba5623d628f0a2812ac3c4b7124..b1393c4407debba810b542a56912b38e4eb78120 100644 (file)
@@ -506,7 +506,10 @@ def index(fp, db, classname, filterspec={}, filter=[], columns=[], sort=[],
                         for value in cl.get(nodeid, name):
                             l.append(group_cl.get(value, key))
                     else:
-                        l.append(cl.get(nodeid, name))
+                        value = cl.get(nodeid, name)
+                        if value is None:
+                            value = '[empty %s]'%name
+                        l.append(value)
                 w('<tr class="list-header">'
                   '<td align=left colspan=%s><strong>%s</strong></td></tr>'%(
                     len(columns), ', '.join(l)))