From: richard Date: Thu, 19 Jul 2001 05:23:09 +0000 (+0000) Subject: . Fixed bug in re generation in the filter (I hadn't finished the code ;) X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=bbc27e8449eecf74719dbe32cef385ecf297c3bd;p=roundup.git . 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 git-svn-id: http://svn.roundup-tracker.org/svnroot/roundup/trunk@7 57a73879-2fb5-44c3-a270-3262357dd7e2 --- diff --git a/CHANGES b/CHANGES index 9a35d1c..d893fc1 100644 --- 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""xt" te?xt - search for text matching "te""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 diff --git a/Makefile b/Makefile index b662ffc..ac26c15 100644 --- 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 diff --git a/config.py b/config.py index 1cc5365..8dafdc8 100644 --- 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' diff --git a/hyperdb.py b/hyperdb.py index dcd8522..c7684d3 100644 --- a/hyperdb.py +++ b/hyperdb.py @@ -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 == '+': diff --git a/roundup_cgi.py b/roundup_cgi.py index 4319833..2ca5fa7 100644 --- a/roundup_cgi.py +++ b/roundup_cgi.py @@ -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(): diff --git a/roundupdb.py b/roundupdb.py index 96e62f8..4e79832 100644 --- a/roundupdb.py +++ b/roundupdb.py @@ -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") diff --git a/template.py b/template.py index 8b0e4ca..b1393c4 100644 --- a/template.py +++ b/template.py @@ -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('' '%s'%( len(columns), ', '.join(l)))