summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 8bc2281)
raw | patch | inline | side by side (parent: 8bc2281)
author | richard <richard@57a73879-2fb5-44c3-a270-3262357dd7e2> | |
Thu, 2 Aug 2001 06:38:17 +0000 (06:38 +0000) | ||
committer | richard <richard@57a73879-2fb5-44c3-a270-3262357dd7e2> | |
Thu, 2 Aug 2001 06:38:17 +0000 (06:38 +0000) |
include the e-mail address and web interface address. Templates may
override this in their db classes to include specific information (support
instructions, etc).
git-svn-id: http://svn.roundup-tracker.org/svnroot/roundup/trunk@194 57a73879-2fb5-44c3-a270-3262357dd7e2
override this in their db classes to include specific information (support
instructions, etc).
git-svn-id: http://svn.roundup-tracker.org/svnroot/roundup/trunk@194 57a73879-2fb5-44c3-a270-3262357dd7e2
diff --git a/roundup/cgi_client.py b/roundup/cgi_client.py
index 3c497c068bb5ff3da8ab552cb4ac3abf673c172b..7d18ef97b7ea64b6a2e9944fc082de646206569c 100644 (file)
--- a/roundup/cgi_client.py
+++ b/roundup/cgi_client.py
-# $Id: cgi_client.py,v 1.16 2001-08-02 05:55:25 richard Exp $
+# $Id: cgi_client.py,v 1.17 2001-08-02 06:38:17 richard Exp $
import os, cgi, pprint, StringIO, urlparse, re, traceback, mimetypes
props[key] = value
cl.set(self.nodeid, **props)
- self._post_editnode(self.nodeid)
+ self._post_editnode(self.nodeid, changed)
# and some nice feedback for the user
message = '%s edited ok'%', '.join(changed)
except:
props[key] = value
return cl.create(**props)
- def _post_editnode(self, nid):
+ def _post_editnode(self, nid, changes=None):
''' do the linking and message sending part of the node creation
'''
cn = self.classname
summary = note
m = ['%s\n'%note]
else:
- summary = 'This %s has been created through the web.\n'%cn
+ summary = 'This %s has been edited through the web.\n'%cn
m = [summary]
- m.append('\n-------\n')
# generate an edit message - nosyreactor will send it
+ first = 1
for name, prop in props.items():
+ if changes is not None and name not in changes: continue
+ if first:
+ m.append('\n-------')
+ first = 0
value = cl.get(nid, name, None)
if prop.isLinkType:
link = self.db.classes[prop.classname]
- key = link.getkey()
+ key = link.labelprop(default_to_id=1)
if value is not None and key:
value = link.get(value, key)
else:
if value is None: value = []
l = []
link = self.db.classes[prop.classname]
+ key = link.labelprop(default_to_id=1)
for entry in value:
- key = link.getkey()
if key:
l.append(link.get(entry, link.getkey()))
else:
# now create the message
content = '\n'.join(m)
- nosy.remove(self.getuid())
message_id = self.db.msg.create(author=self.getuid(),
- recipients=nosy, date=date.Date('.'), summary=summary,
+ recipients=[], date=date.Date('.'), summary=summary,
content=content)
messages = cl.get(nid, 'messages')
messages.append(message_id)
#
# $Log: not supported by cvs2svn $
+# Revision 1.16 2001/08/02 05:55:25 richard
+# Web edit messages aren't sent to the person who did the edit any more. No
+# message is generated if they are the only person on the nosy list.
+#
# Revision 1.15 2001/08/02 00:34:10 richard
# bleah syntax error
#
diff --git a/roundup/hyperdb.py b/roundup/hyperdb.py
index 3028535381447ee1b9aff0aa155196afa7802f9d..c225e6ac7f7ff7d34bfac7fb1d4862d4484c6ccf 100644 (file)
--- a/roundup/hyperdb.py
+++ b/roundup/hyperdb.py
"""Return the name of the key property for this class or None."""
return self.key
- def labelprop(self):
+ def labelprop(self, default_to_id=0):
''' Return the property name for a label for the given node.
This method attempts to generate a consistent label for the node.
return 'name'
elif props.has_key('title'):
return 'title'
+ if default_to_id:
+ return 'id'
props = props.keys()
props.sort()
return props[0]
#
# $Log: not supported by cvs2svn $
+# Revision 1.11 2001/08/01 04:24:21 richard
+# mailgw was assuming certain properties existed on the issues being created.
+#
# Revision 1.10 2001/07/30 02:38:31 richard
# get() now has a default arg - for migration only.
#
diff --git a/roundup/roundupdb.py b/roundup/roundupdb.py
index 5b33f30f0154c8681cd65e2bcf9b128983d08523..b9749d305373300c64972d847f9bddfcf27d8fad 100644 (file)
--- a/roundup/roundupdb.py
+++ b/roundup/roundupdb.py
-# $Id: roundupdb.py,v 1.7 2001-07-30 02:38:31 richard Exp $
+# $Id: roundupdb.py,v 1.8 2001-08-02 06:38:17 richard Exp $
import re, os, smtplib, socket
m.append('Reply-To: %s'%self.ISSUE_TRACKER_EMAIL)
m.append('')
m.append(self.db.msg.get(msgid, 'content'))
+ m.append(self.email_footer(nodeid, msgid))
# TODO attachments
try:
smtp = smtplib.SMTP(self.MAILHOST)
except smtplib.SMTPException, value:
return "Couldn't send confirmation email: %s"%value
+ def email_footer(self, nodeid, msgid):
+ ''' Add a footer to the e-mail with some useful information
+ '''
+ web = self.ISSUE_TRACKER_WEB
+ return '''%s
+Roundup issue tracker
+%s
+%s
+'''%('_'*len(web), self.ISSUE_TRACKER_EMAIL, web)
+
#
# $Log: not supported by cvs2svn $
+# Revision 1.7 2001/07/30 02:38:31 richard
+# get() now has a default arg - for migration only.
+#
# Revision 1.6 2001/07/30 00:05:54 richard
# Fixed IssueClass so that superseders links to its classname rather than
# hard-coded to "issue".
index 06f39e47b1dcec858440ae65c4b865acac168183..cd6d380a8b88298813ea4587d6258763732a485e 100644 (file)
-# $Id: dbinit.py,v 1.4 2001-07-29 07:01:39 richard Exp $
+# $Id: dbinit.py,v 1.5 2001-08-02 06:38:17 richard Exp $
import os
class IssueClass(roundupdb.IssueClass):
''' issues need the email information
'''
+ ISSUE_TRACKER_WEB = instance_config.ISSUE_TRACKER_WEB
ISSUE_TRACKER_EMAIL = instance_config.ISSUE_TRACKER_EMAIL
ADMIN_EMAIL = instance_config.ADMIN_EMAIL
MAILHOST = instance_config.MAILHOST
#
# $Log: not supported by cvs2svn $
+# Revision 1.4 2001/07/29 07:01:39 richard
+# Added vim command to all source so that we don't get no steenkin' tabs :)
+#
# Revision 1.3 2001/07/24 10:46:22 anthonybaxter
# Added templatebuilder module. two functions - one to pack up the html base,
# one to unpack it. Packed up the two standard templates into htmlbases.
diff --git a/roundup/templates/classic/instance_config.py b/roundup/templates/classic/instance_config.py
index cdf3187eb6603e32ae9497e24771091232e1c046..eab3e2aeda944c3d7e43895041cd1603382e4a63 100644 (file)
-# $Id: instance_config.py,v 1.2 2001-07-29 07:01:39 richard Exp $
+# $Id: instance_config.py,v 1.3 2001-08-02 06:38:17 richard Exp $
MAIL_DOMAIN=MAILHOST=HTTP_HOST=None
HTTP_PORT=0
# The email address that mail to roundup should go to
ISSUE_TRACKER_EMAIL = 'issue_tracker@%s'%MAIL_DOMAIN
+# The web address that the instance is viewable at
+ISSUE_TRACKER_WEB = 'http://www.bizarsoftware.com.au/cgi-bin/roundup.cgi/issues'
+
# The email address that roundup will complain to if it runs into trouble
ADMIN_EMAIL = 'roundup-admin@%s'%MAIL_DOMAIN
#
# $Log: not supported by cvs2svn $
+# Revision 1.2 2001/07/29 07:01:39 richard
+# Added vim command to all source so that we don't get no steenkin' tabs :)
+#
# Revision 1.1 2001/07/23 23:28:43 richard
# Adding the classic template
#
index f870b490e70821bc53c9c23fb44ab41b3234f7c4..4d532ca0f5073dd5f8e14500e695151f961d15af 100644 (file)
-# $Id: dbinit.py,v 1.8 2001-07-30 01:26:59 richard Exp $
+# $Id: dbinit.py,v 1.9 2001-08-02 06:38:17 richard Exp $
import os
class IssueClass(roundupdb.IssueClass):
''' issues need the email information
'''
+ ISSUE_TRACKER_WEB = instance_config.ISSUE_TRACKER_WEB
ISSUE_TRACKER_EMAIL = instance_config.ISSUE_TRACKER_EMAIL
ADMIN_EMAIL = instance_config.ADMIN_EMAIL
MAILHOST = instance_config.MAILHOST
#
# $Log: not supported by cvs2svn $
+# Revision 1.8 2001/07/30 01:26:59 richard
+# Big changes:
+# . split off the support priority into its own class
+# . added "new support, new user" to the page head
+# . fixed the display options for the heading links
+#
# Revision 1.7 2001/07/29 07:01:39 richard
# Added vim command to all source so that we don't get no steenkin' tabs :)
#
diff --git a/roundup/templates/extended/instance_config.py b/roundup/templates/extended/instance_config.py
index e8fc5ddd4e7d9efb55c14072d40f8bf6f4db5637..fb45ee6acd88f8c1cf69fb73f858bca0b6377c61 100644 (file)
-# $Id: instance_config.py,v 1.2 2001-07-29 07:01:39 richard Exp $
+# $Id: instance_config.py,v 1.3 2001-08-02 06:38:17 richard Exp $
MAIL_DOMAIN=MAILHOST=HTTP_HOST=None
HTTP_PORT=0
# The email address that mail to roundup should go to
ISSUE_TRACKER_EMAIL = 'issue_tracker@%s'%MAIL_DOMAIN
+# The web address that the instance is viewable at
+ISSUE_TRACKER_WEB = 'http://www.bizarsoftware.com.au/cgi-bin/roundup.cgi/issues'
+
# The email address that roundup will complain to if it runs into trouble
ADMIN_EMAIL = 'roundup-admin@%s'%MAIL_DOMAIN
#
# $Log: not supported by cvs2svn $
+# Revision 1.2 2001/07/29 07:01:39 richard
+# Added vim command to all source so that we don't get no steenkin' tabs :)
+#
# Revision 1.1 2001/07/23 04:33:21 anthonybaxter
# split __init__.py into 2. dbinit and instance_config.
#