summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: f9ced32)
raw | patch | inline | side by side (parent: f9ced32)
author | richard <richard@57a73879-2fb5-44c3-a270-3262357dd7e2> | |
Tue, 8 Jan 2002 03:56:55 +0000 (03:56 +0000) | ||
committer | richard <richard@57a73879-2fb5-44c3-a270-3262357dd7e2> | |
Tue, 8 Jan 2002 03:56:55 +0000 (03:56 +0000) |
. #495392 ] empty nosy -patch
git-svn-id: http://svn.roundup-tracker.org/svnroot/roundup/trunk@508 57a73879-2fb5-44c3-a270-3262357dd7e2
git-svn-id: http://svn.roundup-tracker.org/svnroot/roundup/trunk@508 57a73879-2fb5-44c3-a270-3262357dd7e2
roundup/cgi_client.py | patch | blob | history |
diff --git a/roundup/cgi_client.py b/roundup/cgi_client.py
index 30c040346482f56280d2b669eae0721fc8772116..86177bb6b257e0978b35d5d4970cb982d5e404f7 100644 (file)
--- a/roundup/cgi_client.py
+++ b/roundup/cgi_client.py
# BASIS, AND THERE IS NO OBLIGATION WHATSOEVER TO PROVIDE MAINTENANCE,
# SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
#
-# $Id: cgi_client.py,v 1.89 2002-01-07 20:24:45 richard Exp $
+# $Id: cgi_client.py,v 1.90 2002-01-08 03:56:55 richard Exp $
__doc__ = """
WWW request handler (also used in the stand-alone server).
showissue = shownode
showmsg = shownode
+ def _add_assignedto_to_nosy(self, props):
+ ''' add the assignedto value from the props to the nosy list
+ '''
+ if not props.has_key('assignedto'):
+ return
+ assignedto_id = props['assignedto']
+ if props.has_key('nosy') and assignedto_id not in props['nosy']:
+ props['nosy'].append(assignedto_id)
+ else:
+ props['nosy'] = cl.get(self.nodeid, 'nosy')
+ props['nosy'].append(assignedto_id)
+
def _changenode(self, props):
''' change the node based on the contents of the form
'''
resolved_id = self.db.status.lookup('resolved')
chatting_id = self.db.status.lookup('chatting')
current_status = cl.get(self.nodeid, 'status')
+ if props.has_key('status'):
+ new_status = props['status']
+ else:
+ # apparently there's a chance that some browsers don't
+ # send status...
+ new_status = current_status
except KeyError:
pass
else:
- if (props['status'] == unread_id or props['status'] == resolved_id and current_status == resolved_id):
+ if new_status == unread_id or (new_status == resolved_id
+ and current_status == resolved_id):
props['status'] = chatting_id
- # add assignedto to the nosy list
- if props.has_key('assignedto'):
- assignedto_id = props['assignedto']
- if assignedto_id not in props['nosy']:
- props['nosy'].append(assignedto_id)
+
+ self._add_assignedto_to_nosy(props)
+
# create the message
message, files = self._handle_message()
if message:
pass
else:
props['status'] = unread_id
- # add assignedto to the nosy list
- if props.has_key('assignedto'):
- assignedto_id = props['assignedto']
- if props.has_key('nosy') and assignedto_id not in props['nosy']:
- props['nosy'].append(assignedto_id)
- else:
- props['nosy'] = [assignedto_id]
+
+ self._add_assignedto_to_nosy(props)
+
# check for messages and files
message, files = self._handle_message()
if message:
#
# $Log: not supported by cvs2svn $
+# Revision 1.89 2002/01/07 20:24:45 richard
+# *mutter* stupid cutnpaste
+#
# Revision 1.88 2002/01/02 02:31:38 richard
# Sorry for the huge checkin message - I was only intending to implement #496356
# but I found a number of places where things had been broken by transactions: