From 067ef19de21e501bce543474bdf633f4d4e72f95 Mon Sep 17 00:00:00 2001 From: richard Date: Fri, 13 Sep 2002 00:08:44 +0000 Subject: [PATCH] Cleaned up CHANGES/TODO Added try/finally to enforce db.close() Changed default classic issue item display to only show message summary git-svn-id: http://svn.roundup-tracker.org/svnroot/roundup/trunk@1155 57a73879-2fb5-44c3-a270-3262357dd7e2 --- CHANGES.txt | 41 +++++++- TODO.txt | 107 +++++++------------- doc/customizing.txt | 24 ++++- roundup/admin.py | 20 ++-- roundup/cgi/client.py | 11 +- roundup/cgi/templating.py | 9 +- roundup/scripts/roundup_mailgw.py | 49 +++++---- roundup/templates/classic/html/issue.item | 22 ++-- roundup/templates/classic/html/keyword.item | 20 ++-- roundup/templates/classic/html/msg.item | 2 +- roundup/templates/classic/html/style.css | 9 +- 11 files changed, 187 insertions(+), 127 deletions(-) diff --git a/CHANGES.txt b/CHANGES.txt index 60470d2..22da228 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -1,7 +1,14 @@ This file contains the changes to the Roundup system over time. The entries are given with the most recent entry first. -2002-??-?? 0.5.0 +2002-09-?? 0.5.0 beta2 +Fixed: + . all backends now have a .close() method, and it's used everywhere + . fixed bug in detectors __init__ + . switched the default issue item display to only show issue summary + (add instructions to doc to make it display entire content) + +2002-09-11 0.5.0 beta1 Fixed: . #576086 ] dumb copying mistake (frontends/ZRoundup.py) . installation instructions now mention "python2" in "testing your python". @@ -11,9 +18,37 @@ Fixed: . fixed the date module so that Date(". - 2d") works . web forms may now unset Link values (like assignedto) . cleanup: moved roundup.templatebuilder to roundup.templates.builder + . instance __init__ no longer silently traps dbinit import errors Feature: -TODO: roll stuff in from the TODO to here + . new backend for metakit (thanks Gordon McMillan) + . new backend for gadfly (it's as done as it's going to get) + . further split the dbm backends from the core code, allowing easier + non-dict-like backends (eg metakit, RDB) + . implemented and used the new access control mechanisms (Permissions, Roles) + (see doc/security.txt) + . switched templating to use Zope's PageTemplates (yay!) + . switched to sessions for web authentication + . added Boolean and Number types + . fixed the journal bloat + . updated design document for new access controls + . updated customisation document, including more examples + . entire database export and import (incl files) + . better mailgw help message (feature request #558562) + . re-enabled link backrefs from messages (feature request #568714) + . the page layout is now templatable + . re-worked cgi interface to abstract out the explicit "issue" interface + . have index page handle mid-page errors better so header and footer are + still visible + . we handle "not found", access and item page render errors better + . fixed double-submit by having new-item-submit redirect at end + . daemonify roundup-server (fork, logfile, pidfile) + . modify cgitb to display PageTemplate errors better + . rename to "instance" to "tracker" + . have roundup.cgi pick up tracker config from the environment + . revamped look and feel in web interface + . cleaned up stylesheet usage + . several bug fixes and documentation fixes . added is_retired test to hyperdb.Class . added capability to save queries: - a query Class with name, klass (to search) and url (query string) @@ -48,10 +83,8 @@ TODO: roll stuff in from the TODO to here index . added email display function - mangles email addrs so they're not so easily scraped from the web - . added sorting of checklist HTML display . switched to using a session-based web login . made mailgw handle set and modify operations on multilinks (bug #579094) - . all storage-specific code (ie. backend) is now implemented by the backends . fixed the journal bloat from multilink changes - we just log the add or remove operations, not the whole list diff --git a/TODO.txt b/TODO.txt index 08f6495..6582b4e 100644 --- a/TODO.txt +++ b/TODO.txt @@ -1,6 +1,7 @@ General Roundup project TODO list. Note that some of these are semi-formed ideas. Those ideas that don't make the cutoff for the next major release are -punted automatically into the subsequent major release TODO. +punted automatically into the subsequent major release TODO. When stuff is +done, it's moved to the CHANGES file. ======= ========= ============================================================ State Component Description @@ -16,77 +17,47 @@ pending hyperdb range searching of values (dates in particular). pending hyperdb make creator, creation and activity available pre-commit pending hyperdb migrate "id" property to be Number type pending instance split instance.open() into open() and login() -pending mailgw allow commands (feature request #556996) - like "help", "dump issue123" (would send all info about - issue123, including a digest of all messages, but probably - not all files...), "list issue", ... -pending mailgw Allow multiple email addresses at one gw with different default - classes and property values (possibly through command-line - args to the mailgw as invoked in the mail delivery "aliases" - file) eg:: +pending mailgw allow commands (feature request #556996) + like "help", "dump issue123" (would send all info about + issue123, including a digest of all messages, but probably + not all files...), "list issue", ... +pending mailgw Allow multiple email addresses at one gw with different + default classes and property values (possibly through + command-line args to the mailgw as invoked in the mail + delivery "aliases" file) eg:: roundup: "|roundup-mailgw /instances/dev" vmbugs: "|roundup-mailgw /instances/dev component=voicemail" -pending project switch to a Roundup instance for Roundup bug/feature tracking -pending project have the demo allow anonymous login -pending security an LDAP user database implementation -pending security authenticate over a secure connection -pending security optionally auth with Basic HTTP auth instead of cookies -pending security use digital signatures in mailgw -pending security submission protection (ok, I've forgotten what this is) -pending web I18N -pending web Better message summary display (feature request #520244) -pending web Navigating around the issues (feature request #559149) -pending web Quick help links next to the property labels giving a - description of the property. Combine with help for the actual - form element too, eg. how to use the nosy list edit box. -pending web clicking on a group header should filter for that type of entry -pending web re-enable auth by basic http auth -pending web search "refinement" - pre-fill the search page with the - current search parameters -pending web UNIX init.d script for roundup-server -pending web rewritten documentation (can come after the beta though so - stuff is settled) ... including relevant file names in - customisation doc -pending web allow multilink selections to select a "none" element to allow - people with broken browsers to select nothing? -pending web password edit fields should always appear in pairs - for - confirmation -pending dist include the HTML in docs +pending project switch to a Roundup instance for Roundup bug/feature tracking +pending project have the demo allow anonymous login +pending security an LDAP user database implementation +pending security authenticate over a secure connection +pending security optionally auth with Basic HTTP auth instead of cookies +pending security use digital signatures in mailgw +pending security submission protection (ok, I've forgotten what this is) +pending web I18N +pending web Better message summary display (feature request #520244) +pending web Navigating around the issues (feature request #559149) +pending web Quick help links next to the property labels giving a + description of the property. Combine with help for the actual + form element too, eg. how to use the nosy list edit box. +pending web clicking on a group header should filter for that type of + entry +pending web re-enable auth by basic http auth +pending web search "refinement" - pre-fill the search page with the + current search parameters +pending web UNIX init.d script for roundup-server +pending web rewritten documentation (can come after the beta though so + stuff is settled) ... including relevant file names in + customisation doc +pending web allow multilink selections to select a "none" element to allow + people with broken browsers to select nothing? +pending web password edit fields should always appear in pairs - for + confirmation +pending web write a _generic.item +pending dist include the HTML in docs -bug web request.url is incorrect in cgi-bin environments - -done instance rename to "instance" to "tracker" -done hyperdb write a backend for gadfly (it's as done as it's going to get) -done hyperdb full-text search also search certain String properties -done hyperdb further split the *dbm backends from the core code, allowing - easier non-dict-like backends (eg metakit, RDB) -done hyperdb fix the journal bloat -done hyperdb add Boolean and Number types (GM) -done hyperdb update design document -done hyperdb entire database export and import (incl files) -done mailgw better help message (feature request #558562) -done security add info from doc/security.txt to design doc -done security switch to sessions for web authentication -done security implement and use the new logical control mechanisms -done web Re-enable link backrefs from messages (feature request #568714) -done web have the page layout (header/footer) be templatable -done web fixing the templating so it works -done web re-work cgi interface to abstract out the explicit "issue" - interface -done web have index page handle mid-page errors better so header and - footer are still visible -done web saving of named queries (GM, mangled by RJ :) -done web handle "not found", access and item page render errors better -done web fix double-submit by having new-item-submit redirect at end -done web daemonify roundup-server (fork, logfile, pidfile) -done web modify cgitb to display PageTemplate errors better -done web have roundup.cgi pick up instance config from the environment -done web indicate that generated pages shouldn't be cached -done admin have "set" command be applicable to all items in a class, and - also be able to unset properties (ie. set to None) - -reject instance the use of non-Python configuration files (ConfigParser) +bug web request.url is incorrect in cgi-bin environments ======= ======== ============================================================= diff --git a/doc/customizing.txt b/doc/customizing.txt index 6b9dc91..76a8901 100644 --- a/doc/customizing.txt +++ b/doc/customizing.txt @@ -2,7 +2,7 @@ Customising Roundup =================== -:Version: $Revision: 1.31 $ +:Version: $Revision: 1.32 $ .. This document borrows from the ZopeBook section on ZPT. The original is at: http://www.zope.org/Documentation/Books/ZopeBook/current/ZPT.stx @@ -1757,6 +1757,28 @@ to. which displays only the allowed status to transition to. +Displaying entire message contents in the issue display +------------------------------------------------------- + +Alter the issue.item template section for messages to:: + + + + + + + + + + + + + +
Messages
authordate
+
content
+
+ ------------------- Back to `Table of Contents`_ diff --git a/roundup/admin.py b/roundup/admin.py index 4242cbf..aca8b1f 100644 --- a/roundup/admin.py +++ b/roundup/admin.py @@ -16,7 +16,7 @@ # BASIS, AND THERE IS NO OBLIGATION WHATSOEVER TO PROVIDE MAINTENANCE, # SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. # -# $Id: admin.py,v 1.29 2002-09-11 01:19:45 richard Exp $ +# $Id: admin.py,v 1.30 2002-09-13 00:08:43 richard Exp $ import sys, os, getpass, getopt, re, UserDict, shlex, shutil try: @@ -1152,14 +1152,18 @@ Date format is "YYYY-MM-DD" eg: self.comma_sep = 1 # if no command - go interactive + # wrap in a try/finally so we always close off the db ret = 0 - if not args: - self.interactive() - else: - ret = self.run_command(args) - if self.db: self.db.commit() - return ret - + try: + if not args: + self.interactive() + else: + ret = self.run_command(args) + if self.db: self.db.commit() + return ret + finally: + if self.db: + self.db.close() if __name__ == '__main__': tool = AdminTool() diff --git a/roundup/cgi/client.py b/roundup/cgi/client.py index 481384c..4275c87 100644 --- a/roundup/cgi/client.py +++ b/roundup/cgi/client.py @@ -1,4 +1,4 @@ -# $Id: client.py,v 1.31 2002-09-12 07:00:41 richard Exp $ +# $Id: client.py,v 1.32 2002-09-13 00:08:44 richard Exp $ __doc__ = """ WWW request handler (also used in the stand-alone server). @@ -105,6 +105,15 @@ class Client: self.response_code = 200 def main(self): + ''' Wrap the real main in a try/finally so we always close off the db. + ''' + try: + self.inner_main() + finally: + if hasattr(self, 'db'): + self.db.close() + + def inner_main(self): ''' Process a request. The most common requests are handled like so: diff --git a/roundup/cgi/templating.py b/roundup/cgi/templating.py index 6a1aad7..81d10ac 100644 --- a/roundup/cgi/templating.py +++ b/roundup/cgi/templating.py @@ -706,8 +706,13 @@ class StringHTMLProperty(HTMLProperty): ''' if self._value is None: value = '' else: value = str(self._value) - value = value.replace('@', ' at ') - value = value.replace('.', ' ') + if value.find('@') != -1: + name, domain = value.split('@') + domain = ' '.join(domain.split('.')[:-1]) + name = name.replace('.', ' ') + value = '%s at %s ...'%(name, domain) + else: + value = value.replace('.', ' ') if escape: value = cgi.escape(value) return value diff --git a/roundup/scripts/roundup_mailgw.py b/roundup/scripts/roundup_mailgw.py index d644636..c31530a 100644 --- a/roundup/scripts/roundup_mailgw.py +++ b/roundup/scripts/roundup_mailgw.py @@ -14,7 +14,7 @@ # BASIS, AND THERE IS NO OBLIGATION WHATSOEVER TO PROVIDE MAINTENANCE, # SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. # -# $Id: roundup_mailgw.py,v 1.5 2002-09-11 01:19:16 richard Exp $ +# $Id: roundup_mailgw.py,v 1.6 2002-09-13 00:08:44 richard Exp $ # python version check from roundup import version_check @@ -76,27 +76,32 @@ def main(args): # get a mail handler db = instance.open('admin') - handler = instance.MailGW(instance, db) - - # if there's no more arguments, read a single message from stdin - if len(args) == 2: - return handler.do_pipe() - - # otherwise, figure what sort of mail source to handle - if len(args) < 4: - return usage(args, _('Error: not enough source specification information')) - source, specification = args[2:] - if source == 'mailbox': - return handler.do_mailbox(specification) - elif source == 'pop': - m = re.match(r'((?P[^:]+)(:(?P.+))?@)?(?P.+)', - specification) - if m: - return handler.do_pop(m.group('server'), m.group('user'), - m.group('pass')) - return usage(args, _('Error: pop specification not valid')) - - return usage(args, _('Error: The source must be either "mailbox" or "pop"')) + + # now wrap in try/finally so we always close the database + try: + handler = instance.MailGW(instance, db) + + # if there's no more arguments, read a single message from stdin + if len(args) == 2: + return handler.do_pipe() + + # otherwise, figure what sort of mail source to handle + if len(args) < 4: + return usage(args, _('Error: not enough source specification information')) + source, specification = args[2:] + if source == 'mailbox': + return handler.do_mailbox(specification) + elif source == 'pop': + m = re.match(r'((?P[^:]+)(:(?P.+))?@)?(?P.+)', + specification) + if m: + return handler.do_pop(m.group('server'), m.group('user'), + m.group('pass')) + return usage(args, _('Error: pop specification not valid')) + + return usage(args, _('Error: The source must be either "mailbox" or "pop"')) + finally: + db.close() def run(): sys.exit(main(sys.argv)) diff --git a/roundup/templates/classic/html/issue.item b/roundup/templates/classic/html/issue.item index 50eca43..12744a6 100644 --- a/roundup/templates/classic/html/issue.item +++ b/roundup/templates/classic/html/issue.item @@ -70,19 +70,17 @@ changed ${context/activity}.">activity info + - - - - - - - - - - - + + + + + + + +
Messages
authordate
content
Messages
MessageAuthorDateSummary
authordatesummary
diff --git a/roundup/templates/classic/html/keyword.item b/roundup/templates/classic/html/keyword.item index cc73e88..fe56700 100644 --- a/roundup/templates/classic/html/keyword.item +++ b/roundup/templates/classic/html/keyword.item @@ -1,13 +1,21 @@ -
+
- - + + + + + -
Existing Keywords
keyword here
+ keyword here +
+ To edit an existing keyword (for spelling or typing errors), + click on its entry above. +
 

diff --git a/roundup/templates/classic/html/msg.item b/roundup/templates/classic/html/msg.item index ace29ef..06d2200 100644 --- a/roundup/templates/classic/html/msg.item +++ b/roundup/templates/classic/html/msg.item @@ -20,7 +20,7 @@ - +
Content
diff --git a/roundup/templates/classic/html/style.css b/roundup/templates/classic/html/style.css index bbb7f18..9b1dc12 100644 --- a/roundup/templates/classic/html/style.css +++ b/roundup/templates/classic/html/style.css @@ -133,11 +133,11 @@ table.list td { vertical-align: top; } -table.list td.normal { +table.list tr.normal td { empty-cells: show; } -table.list td.alt { +table.list tr.alt td { background-color: #efefef; empty-cells: show; } @@ -177,6 +177,11 @@ table.messages th { } table.messages td { + text-align: left; + empty-cells: show; +} + +table.messages td.content { font-family: monospace; background-color: #efefef; border-top: 1px solid #afafaf; -- 2.30.2