Skip to content

Commit 204d958

Browse files
author
Richard Jones
committed
Sorry about this huge checkin!
It's fixing a lot of related stuff in one go though. . [SF#541941] changing multilink properties by mail . [SF#526730] search for messages capability . [SF#505180] split MailGW.handle_Message - also changed cgi client since it was duplicating the functionality . build htmlbase if tests are run using CVS checkout (removed note from installation.txt) . don't create an empty message on email issue creation if the email is empty
1 parent 4e612f8 commit 204d958

File tree

17 files changed

+671
-433
lines changed

17 files changed

+671
-433
lines changed

CHANGES.txt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,11 @@ Feature:
3232
. applied patch #558876 ] cgi client customization
3333
. split instance initialisation into two steps, allowing config changes
3434
before the database is initialised.
35+
. don't create an empty message on email issue creation if the email is empty
36+
. #541941 ] changing multilink properties by mail
3537
. #526730 ] search for messages capability
38+
. #505180 ] split MailGW.handle_Message
39+
- also changed cgi client since it was duplicating the functionality
3640

3741
Fixed:
3842
. stop sending blank (whitespace-only) notes
@@ -58,6 +62,7 @@ Fixed:
5862
. cleaned out the template stylesheets, removing a bunch of junk that really
5963
wasn't necessary (font specs, styles never used) and added a style for
6064
message content
65+
. build htmlbase if tests are run using CVS checkout
6166

6267
2002-03-25 - 0.4.1
6368
Feature:

MANIFEST.in

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,5 +5,5 @@ recursive-include test *.py *.txt
55
recursive-include doc *.html *.png *.txt
66
exclude doc/announcement.txt
77
include roundup-*
8-
include *.txt
8+
include run_tests *.txt
99

MIGRATION.txt

Lines changed: 22 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -9,18 +9,7 @@ This file contains information for users upgrading from:
99
0.3.x -> 0.4.x
1010
0.2.x -> 0.3.x
1111

12-
From CVS
13-
========
14-
15-
Files storage
16-
-------------
17-
18-
Messages and files from newly created issues will be put into subdierectories
19-
in thousands e.g. msg123 will be put into files/msg/0/msg123, file2003
20-
will go into files/file/2/file2003. Previous messages are still found, but
21-
could be put into this structure.
22-
23-
Migrating from 0.4.0 to 0.4.1
12+
Migrating from 0.4.1 to 0.4.2
2413
=============================
2514

2615
Configuration
@@ -38,9 +27,30 @@ The new configuration variables are:
3827
- ADD_RECIPIENTS_TO_NOSY
3928

4029

30+
Mail Gateway
31+
------------
32+
33+
You will need to copy the detectors from the distribution into your instance
34+
home detectors directory. The schema-specific code has been removed from the
35+
mail gateway and made into auditors:
36+
37+
- nosyreactor.py has now got an updatenosy auditor which updates the nosy
38+
list with author, recipient and assignedto information.
39+
- statusauditor.py makes the unread or resolved -> chatting changes and
40+
presets the status of an issue to unread.
41+
42+
4143
Migrating from 0.4.0 to 0.4.1
4244
=============================
4345

46+
Files storage
47+
-------------
48+
49+
Messages and files from newly created issues will be put into subdierectories
50+
in thousands e.g. msg123 will be put into files/msg/0/msg123, file2003
51+
will go into files/file/2/file2003. Previous messages are still found, but
52+
could be put into this structure.
53+
4454
Configuration
4555
-------------
4656

@@ -68,8 +78,6 @@ the appropriate variables in instance_config.py.
6878
The extended schema has similar variables added too - see the source for more
6979
info.
7080

71-
72-
7381
Alternate E-Mail Addresses
7482
--------------------------
7583

doc/installation.txt

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
Installing Roundup
33
==================
44

5-
:Version: $Revision: 1.10 $
5+
:Version: $Revision: 1.11 $
66

77
.. contents::
88

@@ -69,10 +69,6 @@ Testing your Python
6969
Run ``"python ./run_tests"`` and make sure there
7070
are no errors. If there are errors, please let us know!
7171

72-
Note: if you're installing from the CVS, you will need to run "python setup.py
73-
build" before the tests will work, as there are modules that must be
74-
generated that are not stored in the CVS.
75-
7672

7773
Getting Roundup
7874
===============

doc/user_guide.txt

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
User Guide
33
==========
44

5-
:Version: $Revision: 1.3 $
5+
:Version: $Revision: 1.4 $
66

77
.. contents::
88

@@ -222,7 +222,22 @@ Setting Properties
222222
The e-mail interface also provides a simple way to set properties on items. At
223223
the end of the subject line, propname=value pairs can be specified in square
224224
brackets, using the same conventions as for the roundup set shell command.
225-
explanatory message given in the exception.
225+
226+
For example,
227+
228+
- setting the priority of an issue::
229+
230+
Subject: Re: [issue1] the coffee machine is broken! [priority=urgent]
231+
232+
- adding yourself to a nosy list (both of these are equivalent)::
233+
234+
Subject: Re: [issue2] we're out of widgets [nosy=+richard]
235+
Subject: Re: [issue2] we're out of widgets [nosy=richard]
236+
237+
- removing yourself from a nosy list::
238+
239+
Subject: Re: [issue2] we're out of widgets [nosy=-richard]
240+
226241

227242
Message content
228243
~~~~~~~~~~~~~~~

roundup/cgi_client.py

Lines changed: 4 additions & 93 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
# BASIS, AND THERE IS NO OBLIGATION WHATSOEVER TO PROVIDE MAINTENANCE,
1616
# SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
1717
#
18-
# $Id: cgi_client.py,v 1.125 2002-05-25 07:16:24 rochecompaan Exp $
18+
# $Id: cgi_client.py,v 1.126 2002-05-29 01:16:17 richard Exp $
1919

2020
__doc__ = """
2121
WWW request handler (also used in the stand-alone server).
@@ -604,86 +604,10 @@ def shownode(self, message=None):
604604
showmsg = shownode
605605
searchissue = searchnode
606606

607-
def _add_author_to_nosy(self, props):
608-
''' add the author value from the props to the nosy list
609-
'''
610-
if not props.has_key('author'):
611-
return
612-
author_id = props['author']
613-
if not props.has_key('nosy'):
614-
# load current nosy
615-
if self.nodeid:
616-
cl = self.db.classes[self.classname]
617-
l = cl.get(self.nodeid, 'nosy')
618-
if author_id in l:
619-
return
620-
props['nosy'] = l
621-
else:
622-
props['nosy'] = []
623-
if author_id not in props['nosy']:
624-
props['nosy'].append(author_id)
625-
626-
def _add_assignedto_to_nosy(self, props):
627-
''' add the assignedto value from the props to the nosy list
628-
'''
629-
# get the properties definition and make some checks
630-
if not props.has_key('assignedto'):
631-
return
632-
cl = self.db.classes[self.classname]
633-
propdef = cl.getprops()
634-
if not propdef.has_key('assignedto') or not propdef.has_key('nosy'):
635-
return
636-
637-
# get the assignedto(s)
638-
if isinstance(propdef['assignedto'], hyperdb.Link):
639-
assignedto_ids = [props['assignedto']]
640-
elif isinstance(propdef['assignedto'], hyperdb.Multilink):
641-
assignedto_ids = props['assignedto']
642-
else:
643-
return
644-
645-
# ok, now get the nosy list value
646-
if not props.has_key('nosy'):
647-
# load current nosy
648-
if self.nodeid:
649-
props['nosy'] = cl.get(self.nodeid, 'nosy')
650-
else:
651-
props['nosy'] = []
652-
653-
# and update for assignedto id(s)
654-
for assignedto_id in assignedto_ids:
655-
if assignedto_id not in props['nosy']:
656-
props['nosy'].append(assignedto_id)
657-
658607
def _changenode(self, props):
659608
''' change the node based on the contents of the form
660609
'''
661610
cl = self.db.classes[self.classname]
662-
# set status to chatting if 'unread' or 'resolved'
663-
try:
664-
# determine the id of 'unread','resolved' and 'chatting'
665-
unread_id = self.db.status.lookup('unread')
666-
resolved_id = self.db.status.lookup('resolved')
667-
chatting_id = self.db.status.lookup('chatting')
668-
current_status = cl.get(self.nodeid, 'status')
669-
if props.has_key('status'):
670-
new_status = props['status']
671-
else:
672-
# apparently there's a chance that some browsers don't
673-
# send status...
674-
new_status = current_status
675-
except KeyError:
676-
pass
677-
else:
678-
if new_status == unread_id or (new_status == resolved_id
679-
and current_status == resolved_id):
680-
props['status'] = chatting_id
681-
682-
self._add_assignedto_to_nosy(props)
683-
684-
# possibly add the author of the change to the nosy list
685-
if self.db.config.ADD_AUTHOR_TO_NOSY == 'yes':
686-
self._add_author_to_nosy(props)
687611

688612
# create the message
689613
message, files = self._handle_message()
@@ -701,22 +625,6 @@ def _createnode(self):
701625
cl = self.db.classes[self.classname]
702626
props = parsePropsFromForm(self.db, cl, self.form)
703627

704-
# set status to 'unread' if not specified - a status of '- no
705-
# selection -' doesn't make sense
706-
if not props.has_key('status') and cl.getprops().has_key('status'):
707-
try:
708-
unread_id = self.db.status.lookup('unread')
709-
except KeyError:
710-
pass
711-
else:
712-
props['status'] = unread_id
713-
714-
self._add_assignedto_to_nosy(props)
715-
716-
# possibly add the author of the new node to the nosy list
717-
if self.db.config.ADD_AUTHOR_TO_NOSY in ('new', 'yes'):
718-
self._add_author_to_nosy(props)
719-
720628
# check for messages and files
721629
message, files = self._handle_message()
722630
if message:
@@ -1454,6 +1362,9 @@ def parsePropsFromForm(db, cl, form, nodeid=0):
14541362

14551363
#
14561364
# $Log: not supported by cvs2svn $
1365+
# Revision 1.125 2002/05/25 07:16:24 rochecompaan
1366+
# Merged search_indexing-branch with HEAD
1367+
#
14571368
# Revision 1.124 2002/05/24 02:09:24 richard
14581369
# Nothing like a live demo to show up the bugs ;)
14591370
#

0 commit comments

Comments
 (0)