summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: c753ee0)
raw | patch | inline | side by side (parent: c753ee0)
author | richard <richard@57a73879-2fb5-44c3-a270-3262357dd7e2> | |
Tue, 30 Oct 2001 00:54:45 +0000 (00:54 +0000) | ||
committer | richard <richard@57a73879-2fb5-44c3-a270-3262357dd7e2> | |
Tue, 30 Oct 2001 00:54:45 +0000 (00:54 +0000) |
. #467129 ] Lossage when username=e-mail-address
. #473123 ] Change message generation for author
. MailGW now moves 'resolved' to 'chatting' on receiving e-mail for an issue.
git-svn-id: http://svn.roundup-tracker.org/svnroot/roundup/trunk@348 57a73879-2fb5-44c3-a270-3262357dd7e2
. #473123 ] Change message generation for author
. MailGW now moves 'resolved' to 'chatting' on receiving e-mail for an issue.
git-svn-id: http://svn.roundup-tracker.org/svnroot/roundup/trunk@348 57a73879-2fb5-44c3-a270-3262357dd7e2
diff --git a/CHANGES.txt b/CHANGES.txt
index 611daf3643407140d04e16cce14cfc9d3d73b064..1a0a6be2257098c26051539b139bed9dcab0cd5e 100644 (file)
--- a/CHANGES.txt
+++ b/CHANGES.txt
are given with the most recent entry first.
2001-10-?? - 0.3.0
+Feature:
+ . #467129 ] Lossage when username=e-mail-address
+ . #473123 ] Change message generation for author
+ . MailGW now moves 'resolved' to 'chatting' on receiving e-mail for an issue.
+
Fixed:
. Fixed a bug in HTMLTemplate changes.
. 'unread' to 'chatting' automagic status change was b0rken.
diff --git a/MIGRATION.txt b/MIGRATION.txt
index 15610ca48979fa196b11be1f1a3b7f93310afdeb..19ed5bde8364ab873f624751e6ffd3b59994d06d 100644 (file)
--- a/MIGRATION.txt
+++ b/MIGRATION.txt
the instance_config.py. Simplest solution is to copy the default values from
template in the core source.
+MESSAGES_TO_AUTHOR has been added to the IssueClass in dbinit.py. Set to 'yes'
+to send nosy messages to the author. Default behaviour is to not send nosy
+messages to the author.
+
diff --git a/roundup/mailgw.py b/roundup/mailgw.py
index 76e2638381109fa105b2528b7064566aaa5eb844..3826a0915c0b1ba1cdf2b0db2a9b964f993de009 100644 (file)
--- a/roundup/mailgw.py
+++ b/roundup/mailgw.py
an exception, the original message is bounced back to the sender with the
explanatory message given in the exception.
-$Id: mailgw.py,v 1.25 2001-10-28 23:22:28 richard Exp $
+$Id: mailgw.py,v 1.26 2001-10-30 00:54:45 richard Exp $
'''
messages.append(message_id)
props['messages'] = messages
- # if the message is currently 'unread', then set it to 'chatting'
+ # if the message is currently 'unread' or 'resolved', then set
+ # it to 'chatting'
if properties.has_key('status'):
try:
- # determine the id of 'unread' and 'chatting'
+ # determine the id of 'unread', 'resolved' and 'chatting'
unread_id = self.db.status.lookup('unread')
+ resolved_id = self.db.status.lookup('resolved')
chatting_id = self.db.status.lookup('chatting')
except KeyError:
pass
else:
if (not props.has_key('status') or
- props['status'] == unread_id):
+ props['status'] == unread_id or
+ props['status'] == resolved_id):
props['status'] = chatting_id
cl.set(nodeid, **props)
#
# $Log: not supported by cvs2svn $
+# Revision 1.25 2001/10/28 23:22:28 richard
+# fixed bug #474749 ] Indentations lost
+#
# Revision 1.24 2001/10/23 22:57:52 richard
# Fix unread->chatting auto transition, thanks Roch'e
#
diff --git a/roundup/roundupdb.py b/roundup/roundupdb.py
index 099c1c61532614eded43bda2ecdbe181191cc16b..ab3e0f3de796c6aad5fc835f08c3656dff94e672 100644 (file)
--- a/roundup/roundupdb.py
+++ b/roundup/roundupdb.py
# BASIS, AND THERE IS NO OBLIGATION WHATSOEVER TO PROVIDE MAINTENANCE,
# SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
#
-# $Id: roundupdb.py,v 1.15 2001-10-23 01:00:18 richard Exp $
+# $Id: roundupdb.py,v 1.16 2001-10-30 00:54:45 richard Exp $
import re, os, smtplib, socket
'''
(realname, address) = address
users = self.user.stringFind(address=address)
- if users: return users[0]
+ for dummy in range(2):
+ if len(users) > 1:
+ # make sure we don't match the anonymous or admin user
+ for user in users:
+ if user == '1': continue
+ if self.user.get(user, 'username') == 'anonymous': continue
+ # first valid match will do
+ return user
+ # well, I guess we have no choice
+ return user[0]
+ elif users:
+ return users[0]
+ # try to match the username to the address (for local
+ # submissions where the address is empty)
+ users = self.user.stringFind(username=address)
+
+ # couldn't match address or username, so create a new user
return self.user.create(username=address, address=address,
realname=realname)
# XXX deviation from spec - was called ItemClass
class IssueClass(Class):
+ # configuration
+ MESSAGES_TO_AUTHOR = 'no'
+
# Overridden methods:
def __init__(self, db, classname, **properties):
r = {}
for recipid in recipients:
r[recipid] = 1
+
+ # figure the author's id, and indicate they've received the message
authid = self.db.msg.get(msgid, 'author')
r[authid] = 1
- # now figure the nosy people who weren't recipients
sendto = []
+ # ... but duplicate the message to the author as long as it's not
+ # the anonymous user
+ if (self.MESSAGES_TO_AUTHOR == 'yes' and
+ self.db.user.get(authid, 'username') != 'anonymous'):
+ sendto.append(authid)
+
+ # now figure the nosy people who weren't recipients
nosy = self.get(nodeid, 'nosy')
for nosyid in nosy:
+ # Don't send nosy mail to the anonymous user (that user
+ # shouldn't appear in the nosy list, but just in case they
+ # do...)
+ if self.db.user.get(nosyid, 'username') == 'anonymous': continue
if not r.has_key(nosyid):
sendto.append(nosyid)
recipients.append(nosyid)
# TODO attachments
m = ['Subject: [%s%s] %s'%(cn, nodeid, title)]
m.append('To: %s'%', '.join(sendto))
+ m.append('From: %s'%self.ISSUE_TRACKER_EMAIL)
m.append('Reply-To: %s'%self.ISSUE_TRACKER_EMAIL)
m.append('')
# add author information
#
# $Log: not supported by cvs2svn $
+# Revision 1.15 2001/10/23 01:00:18 richard
+# Re-enabled login and registration access after lopping them off via
+# disabling access for anonymous users.
+# Major re-org of the htmltemplate code, cleaning it up significantly. Fixed
+# a couple of bugs while I was there. Probably introduced a couple, but
+# things seem to work OK at the moment.
+#
# Revision 1.14 2001/10/21 07:26:35 richard
# feature #473127: Filenames. I modified the file.index and htmltemplate
# source so that the filename is used in the link and the creation
index 45ee343bf99ef4c32921eabd0b82b08df9a25371..a48553c9050a7bb66f6a8f5442e475cf0b8f3050 100644 (file)
# BASIS, AND THERE IS NO OBLIGATION WHATSOEVER TO PROVIDE MAINTENANCE,
# SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
#
-# $Id: dbinit.py,v 1.8 2001-10-09 07:25:59 richard Exp $
+# $Id: dbinit.py,v 1.9 2001-10-30 00:54:45 richard Exp $
import os
ISSUE_TRACKER_EMAIL = instance_config.ISSUE_TRACKER_EMAIL
ADMIN_EMAIL = instance_config.ADMIN_EMAIL
MAILHOST = instance_config.MAILHOST
+ MESSAGES_TO_AUTHOR = instance_config.MESSAGES_TO_AUTHOR
def open(name=None):
#
# $Log: not supported by cvs2svn $
+# Revision 1.8 2001/10/09 07:25:59 richard
+# Added the Password property type. See "pydoc roundup.password" for
+# implementation details. Have updated some of the documentation too.
+#
# Revision 1.7 2001/08/07 00:24:43 richard
# stupid typo
#
diff --git a/roundup/templates/classic/detectors/nosyreaction.py b/roundup/templates/classic/detectors/nosyreaction.py
index 052cf1f7303861bc381c5c175e8442ac8b03c453..df0651ed2b94864225dff4d8c5a0d5447727539e 100644 (file)
# BASIS, AND THERE IS NO OBLIGATION WHATSOEVER TO PROVIDE MAINTENANCE,
# SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
#
-#$Id: nosyreaction.py,v 1.3 2001-08-07 00:24:43 richard Exp $
+#$Id: nosyreaction.py,v 1.4 2001-10-30 00:54:45 richard Exp $
def nosyreaction(db, cl, nodeid, oldvalues):
''' A standard detector is provided that watches for additions to the
n = {}
for nosyid in nosy: n[nosyid] = 1
change = 0
- # but don't add admin to the nosy list
+ # but don't add admin or the anonymous user to the nosy list
for msgid in messages:
for recipid in db.msg.get(msgid, 'recipients'):
- if recipid != '1' and not n.has_key(recipid):
- change = 1
- nosy.append(recipid)
- authid = db.msg.get(msgid, 'author')
- if authid != '1' and not n.has_key(authid):
+ if recipid == '1': continue
+ if n.has_key(recipid): continue
+ if db.user.get(recipid, 'username') == 'anonymous': continue
change = 1
- nosy.append(authid)
+ nosy.append(recipid)
+ authid = db.msg.get(msgid, 'author')
+ if authid == '1': continue
+ if n.has_key(authid): continue
+ if db.user.get(authid, 'username') == 'anonymous': continue
+ change = 1
+ nosy.append(authid)
if change:
cl.set(nodeid, nosy=nosy)
#
#$Log: not supported by cvs2svn $
+#Revision 1.3 2001/08/07 00:24:43 richard
+#stupid typo
+#
#Revision 1.2 2001/08/07 00:15:51 richard
#Added the copyright/license notice to (nearly) all files at request of
#Bizar Software.
diff --git a/roundup/templates/classic/instance_config.py b/roundup/templates/classic/instance_config.py
index f02335d041ddcb46b5c596640a55562a7a2b6c96..de3759f3ea23b5de0266e1243c17feb350b47c91 100644 (file)
# BASIS, AND THERE IS NO OBLIGATION WHATSOEVER TO PROVIDE MAINTENANCE,
# SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
#
-# $Id: instance_config.py,v 1.8 2001-10-23 01:00:18 richard Exp $
+# $Id: instance_config.py,v 1.9 2001-10-30 00:54:45 richard Exp $
MAIL_DOMAIN=MAILHOST=HTTP_HOST=None
HTTP_PORT=0
# Deny or allow anonymous users to register through the web interface
ANONYMOUS_REGISTER = 'deny' # either 'deny' or 'allow'
+# Send nosy messages to the author of the message
+MESSAGES_TO_AUTHOR = 'no' # either 'yes' or 'no'
+
#
# $Log: not supported by cvs2svn $
+# Revision 1.8 2001/10/23 01:00:18 richard
+# Re-enabled login and registration access after lopping them off via
+# disabling access for anonymous users.
+# Major re-org of the htmltemplate code, cleaning it up significantly. Fixed
+# a couple of bugs while I was there. Probably introduced a couple, but
+# things seem to work OK at the moment.
+#
# Revision 1.7 2001/10/22 03:25:01 richard
# Added configuration for:
# . anonymous user access and registration (deny/allow)
index 8dcbb3e6407ecce0b93d928966552ff5c568b3ba..a730a5c621b2c4c4d4b45ab33a3da4d31ca77770 100644 (file)
# BASIS, AND THERE IS NO OBLIGATION WHATSOEVER TO PROVIDE MAINTENANCE,
# SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
#
-# $Id: dbinit.py,v 1.12 2001-10-09 07:25:59 richard Exp $
+# $Id: dbinit.py,v 1.13 2001-10-30 00:54:45 richard Exp $
import os
ISSUE_TRACKER_EMAIL = instance_config.ISSUE_TRACKER_EMAIL
ADMIN_EMAIL = instance_config.ADMIN_EMAIL
MAILHOST = instance_config.MAILHOST
+ MESSAGES_TO_AUTHOR = instance_config.MESSAGES_TO_AUTHOR
def open(name=None):
#
# $Log: not supported by cvs2svn $
+# Revision 1.12 2001/10/09 07:25:59 richard
+# Added the Password property type. See "pydoc roundup.password" for
+# implementation details. Have updated some of the documentation too.
+#
# Revision 1.11 2001/08/07 00:24:43 richard
# stupid typo
#
diff --git a/roundup/templates/extended/detectors/nosyreaction.py b/roundup/templates/extended/detectors/nosyreaction.py
index 6a9edf83485f205eaaa16f43f1cad08a0fad2503..45e6cee4644972bb55394c196b1325046bd1ab37 100644 (file)
# BASIS, AND THERE IS NO OBLIGATION WHATSOEVER TO PROVIDE MAINTENANCE,
# SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
#
-#$Id: nosyreaction.py,v 1.3 2001-08-07 00:24:43 richard Exp $
+#$Id: nosyreaction.py,v 1.4 2001-10-30 00:54:45 richard Exp $
def nosyreaction(db, cl, nodeid, oldvalues):
''' A standard detector is provided that watches for additions to the
n = {}
for nosyid in nosy: n[nosyid] = 1
change = 0
- # but don't add admin to the nosy list
+ # but don't add admin or the anonymous user to the nosy list
for msgid in messages:
for recipid in db.msg.get(msgid, 'recipients'):
- if recipid != '1' and not n.has_key(recipid):
- change = 1
- nosy.append(recipid)
- authid = db.msg.get(msgid, 'author')
- if authid != '1' and not n.has_key(authid):
+ if recipid == '1': continue
+ if n.has_key(recipid): continue
+ if db.user.get(recipid, 'username') == 'anonymous': continue
change = 1
- nosy.append(authid)
+ nosy.append(recipid)
+ authid = db.msg.get(msgid, 'author')
+ if authid == '1': continue
+ if n.has_key(authid): continue
+ if db.user.get(authid, 'username') == 'anonymous': continue
+ change = 1
+ nosy.append(authid)
if change:
cl.set(nodeid, nosy=nosy)
#
#$Log: not supported by cvs2svn $
+#Revision 1.3 2001/08/07 00:24:43 richard
+#stupid typo
+#
#Revision 1.2 2001/08/07 00:15:51 richard
#Added the copyright/license notice to (nearly) all files at request of
#Bizar Software.
diff --git a/roundup/templates/extended/instance_config.py b/roundup/templates/extended/instance_config.py
index 3260bfa44271d3f0b5393e733c94c3a7dadfd580..78bff5b726be84e8c2f56f7d1bd45bd0f2904be7 100644 (file)
# BASIS, AND THERE IS NO OBLIGATION WHATSOEVER TO PROVIDE MAINTENANCE,
# SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
#
-# $Id: instance_config.py,v 1.8 2001-10-23 01:00:18 richard Exp $
+# $Id: instance_config.py,v 1.9 2001-10-30 00:54:45 richard Exp $
MAIL_DOMAIN=MAILHOST=HTTP_HOST=None
HTTP_PORT=0
# Deny or allow anonymous users to register through the web interface
ANONYMOUS_REGISTER = 'deny'
+# Send nosy messages to the author of the message
+MESSAGES_TO_AUTHOR = 'no' # either 'yes' or 'no'
+
#
# $Log: not supported by cvs2svn $
+# Revision 1.8 2001/10/23 01:00:18 richard
+# Re-enabled login and registration access after lopping them off via
+# disabling access for anonymous users.
+# Major re-org of the htmltemplate code, cleaning it up significantly. Fixed
+# a couple of bugs while I was there. Probably introduced a couple, but
+# things seem to work OK at the moment.
+#
# Revision 1.7 2001/10/22 03:25:01 richard
# Added configuration for:
# . anonymous user access and registration (deny/allow)