From: richard Date: Thu, 2 May 2002 08:07:49 +0000 (+0000) Subject: Added the ADD_AUTHOR_TO_NOSY handling to the CGI interface. X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=14033cf06e87c572a18ed0afc657e662ad84e092;p=roundup.git Added the ADD_AUTHOR_TO_NOSY handling to the CGI interface. git-svn-id: http://svn.roundup-tracker.org/svnroot/roundup/trunk@715 57a73879-2fb5-44c3-a270-3262357dd7e2 --- diff --git a/roundup/cgi_client.py b/roundup/cgi_client.py index 9482b39..066ad1e 100644 --- a/roundup/cgi_client.py +++ b/roundup/cgi_client.py @@ -15,7 +15,7 @@ # BASIS, AND THERE IS NO OBLIGATION WHATSOEVER TO PROVIDE MAINTENANCE, # SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. # -# $Id: cgi_client.py,v 1.115 2002-04-02 01:56:10 richard Exp $ +# $Id: cgi_client.py,v 1.116 2002-05-02 08:07:49 richard Exp $ __doc__ = """ WWW request handler (also used in the stand-alone server). @@ -557,6 +557,25 @@ function help_window(helpurl, width, height) { showissue = shownode showmsg = shownode + def _add_author_to_nosy(self, props): + ''' add the author value from the props to the nosy list + ''' + if not props.has_key('author'): + return + author_id = props['author'] + if not props.has_key('nosy'): + # load current nosy + if self.nodeid: + cl = self.db.classes[self.classname] + l = cl.get(self.nodeid, 'nosy') + if author_id in l: + return + props['nosy'] = l + else: + props['nosy'] = [] + if author_id not in props['nosy']: + props['nosy'].append(author_id) + def _add_assignedto_to_nosy(self, props): ''' add the assignedto value from the props to the nosy list ''' @@ -602,6 +621,10 @@ function help_window(helpurl, width, height) { self._add_assignedto_to_nosy(props) + # possibly add the author of the change to the nosy list + if self.db.config.ADD_AUTHOR_TO_NOSY == 'yes': + self._add_author_to_nosy(props) + # create the message message, files = self._handle_message() if message: @@ -630,6 +653,10 @@ function help_window(helpurl, width, height) { self._add_assignedto_to_nosy(props) + # possibly add the author of the new node to the nosy list + if self.db.config.ADD_AUTHOR_TO_NOSY in ('new', 'yes'): + self._add_author_to_nosy(props) + # check for messages and files message, files = self._handle_message() if message: @@ -1357,6 +1384,9 @@ def parsePropsFromForm(db, cl, form, nodeid=0): # # $Log: not supported by cvs2svn $ +# Revision 1.115 2002/04/02 01:56:10 richard +# . stop sending blank (whitespace-only) notes +# # Revision 1.114 2002/03/17 23:06:05 richard # oops #