summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: ccee483)
raw | patch | inline | side by side (parent: ccee483)
author | richard <richard@57a73879-2fb5-44c3-a270-3262357dd7e2> | |
Fri, 13 Sep 2002 00:08:44 +0000 (00:08 +0000) | ||
committer | richard <richard@57a73879-2fb5-44c3-a270-3262357dd7e2> | |
Fri, 13 Sep 2002 00:08:44 +0000 (00:08 +0000) |
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
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
diff --git a/CHANGES.txt b/CHANGES.txt
index 60470d29f42c6024e8acbfa3ea4de25a4e9e83ed..22da228994ffae80a2328ed727a49d7d9232974e 100644 (file)
--- a/CHANGES.txt
+++ b/CHANGES.txt
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".
. 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)
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 08f649567daed72b39e414bc3fb856b229ac3f84..6582b4e78f1f7e5ab6b797ae4827f37386d4a6aa 100644 (file)
--- a/TODO.txt
+++ b/TODO.txt
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
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 6b9dc9127a2c0f7c5bf395101be5ea51dc488895..76a890164c40e66cc9874b35ca0622c8d31a58e1 100644 (file)
--- a/doc/customizing.txt
+++ b/doc/customizing.txt
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
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::
+
+ <table class="messages" tal:condition="context/messages">
+ <tr><th colspan=3 class="header">Messages</th></tr>
+ <tal:block tal:repeat="msg context/messages/reverse">
+ <tr>
+ <th><a tal:attributes="href string:msg${msg/id}"
+ tal:content="string:msg${msg/id}"></a></th>
+ <th tal:content="string:Author: ${msg/author}">author</th>
+ <th tal:content="string:Date: ${msg/date}">date</th>
+ </tr>
+ <tr>
+ <td colspan="3" class="content">
+ <pre tal:content="msg/content">content</pre>
+ </td>
+ </tr>
+ </tal:block>
+ </table>
+
-------------------
Back to `Table of Contents`_
diff --git a/roundup/admin.py b/roundup/admin.py
index 4242cbf61be0912d9d33ef2f516bc4fb8c83b20b..aca8b1f7b459f337bfbac8741a1e113d26377004 100644 (file)
--- a/roundup/admin.py
+++ b/roundup/admin.py
# 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:
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 481384c36e1c4835c5a2277863998daf84b32ebf..4275c8739bb2d4fbcdeb72a0115c0327540a0135 100644 (file)
--- a/roundup/cgi/client.py
+++ b/roundup/cgi/client.py
-# $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).
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:
index 6a1aad7511c180f8e3b5daaa770dcc7756392e45..81d10ac83241ffca52207c118d09dd2c57195395 100644 (file)
'''
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
index d644636613395f976fcbfbc74065f9475e9c11bf..c31530a0813f597e0c57765b66cf94c53691ef34 100644 (file)
# 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
# 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<user>[^:]+)(:(?P<pass>.+))?@)?(?P<server>.+)',
- 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<user>[^:]+)(:(?P<pass>.+))?@)?(?P<server>.+)',
+ 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))
index 50eca434c07b712a0c25efdfe905bc9a7cdee68e..12744a61bf21c56ae676223f84a2437681a2daee 100644 (file)
changed <b>${context/activity}</b>.">activity info</span>
<tal:block tal:condition="context/id">
+
<table class="messages" tal:condition="context/messages">
- <tr><th colspan=3 class="header">Messages</th></tr>
- <tal:block tal:repeat="msg context/messages/reverse">
- <tr>
- <th><a tal:attributes="href string:msg${msg/id}"
- tal:content="string:msg${msg/id}"></a></th>
- <th tal:content="string:Author: ${msg/author}">author</th>
- <th tal:content="string:Date: ${msg/date}">date</th>
- </tr>
- <tr>
- <td colspan="3"><pre tal:content="msg/content">content</pre></td>
- </tr>
- </tal:block>
+ <tr><th colspan=4 class="header">Messages</th></tr>
+ <tr><th>Message</th><th>Author</th><th>Date</th><th>Summary</th></tr>
+ <tr tal:repeat="msg context/messages/reverse">
+ <td><a tal:attributes="href string:msg${msg/id}"
+ tal:content="string:msg${msg/id}"></a></td>
+ <td tal:content="msg/author">author</td>
+ <td tal:content="msg/date">date</td>
+ <td tal:content="msg/summary">summary</td>
+ </tr>
</table>
<table class="files" tal:condition="context/files">
diff --git a/roundup/templates/classic/html/keyword.item b/roundup/templates/classic/html/keyword.item
index cc73e88d35bb915206f8a5e8c681b42edd999bcf..fe56700fc18846cd789af923bf8e60a851ad0c2e 100644 (file)
<!-- dollarId: keyword.item,v 1.3 2002/05/22 00:32:34 richard Exp dollar-->
-<table class="otherinfo">
+<table class="otherinfo" tal:define="keywords db/keyword/list"
+ tal:condition="keywords">
<tr><th colspan="4" class="header">Existing Keywords</th></tr>
- <tr tal:define="keywords db/keyword/list"
- tal:repeat="start python:range(0, len(keywords), 4)">
- <td tal:define="batch python:utils.Batch(keywords, 4, start)"
- tal:repeat="keyword batch" tal:content="keyword/name">keyword here</td>
+ <tr tal:repeat="start python:range(0, len(keywords), 4)">
+ <td width="25%" tal:define="batch python:utils.Batch(keywords, 4, start)"
+ tal:repeat="keyword batch">
+ <a tal:attributes="href string:keyword${keyword/id}"
+ tal:content="keyword/name">keyword here</a>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="4" style="border-top: 1px solid gray">
+ To edit an existing keyword (for spelling or typing errors),
+ click on its entry above.
+ </td>
</tr>
- <tr><td colspan="4" style="border-top: 1px solid gray"> </td></tr>
</table>
<p class="help" tal:condition="not:context/id">
index ace29ef5baec6a5483f8427e8a4258962d0cfff4..06d22006d226dc5ef7d8a624c27f5ed4309d76cb 100644 (file)
<table class="messages">
<tr><th colspan=2 class="header">Content</th></tr>
<tr>
- <td colspan=2><pre tal:content="context/content"></pre></td>
+ <td class="content" colspan=2><pre tal:content="context/content"></pre></td>
</tr>
</table>
index bbb7f1838e6c624472ecd0db5355d0cf9d75026b..9b1dc12f6d4f0648cb357037f368d1a19005a8d0 100644 (file)
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;
}
}
table.messages td {
+ text-align: left;
+ empty-cells: show;
+}
+
+table.messages td.content {
font-family: monospace;
background-color: #efefef;
border-top: 1px solid #afafaf;