Roundup Tracker - Issues

Issue 495392

classification
empty nosy -patch
Type: Severity: normal
Components: None Versions:
process
Status: closed fixed
:
: : grubert, richard
Priority: normal :

Created on 2001-12-20 12:59 by grubert, last changed 2002-01-08 03:58 by richard.

Messages
msg96 Author: [hidden] (grubert) Date: 2001-12-20 12:59
donot ask how i got it in, i got it out by roundup-admin "set issue1 nosy=1".

but without nosy being, display says "[]"
submitting on the web breaks, somewhere in cgi_client.

if status is not set the same happens.

attached a patch (if upload works)
msg97 Author: [hidden] (grubert) Date: 2001-12-20 13:01
Logged In: YES 
user_id=147070

upload nogo (operas fault?)
--- cgi_client.py   Thu Dec 20 12:39:48 2001
+++ /opt/python2.2/lib/python2.2/site-packages/roundup/cgi_client.py    Thu Dec 20 13:51:49 2001
@@ -350,6 +350,14 @@
     showissue = shownode
     showmsg = shownode

+    def _add_assignedto_to_nosy(self, props):
+        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]
+
     def _changenode(self, props):
         ''' change the node based on the contents of the form
         '''
@@ -364,13 +372,10 @@
         except KeyError:
             pass
         else:
-            if (props['status'] == unread_id or props['status'] == resolved_id and current_status == resolved_id):
+            if (not props.has_key('status') or props['status'] == unread_id or props['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:
@@ -395,13 +400,8 @@
                 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:
msg98 Author: [hidden] (grubert) Date: 2001-12-20 13:02
Logged In: YES 
user_id=147070

upload nogo (operas fault?)
--- cgi_client.py   Thu Dec 20 12:39:48 2001
+++ /opt/python2.2/lib/python2.2/site-packages/roundup/cgi_client.py    Thu Dec 20 13:51:49 2001
@@ -350,6 +350,14 @@
     showissue = shownode
     showmsg = shownode

+    def _add_assignedto_to_nosy(self, props):
+        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]
+
     def _changenode(self, props):
         ''' change the node based on the contents of the form
         '''
@@ -364,13 +372,10 @@
         except KeyError:
             pass
         else:
-            if (props['status'] == unread_id or props['status'] == resolved_id and current_status == resolved_id):
+            if (not props.has_key('status') or props['status'] == unread_id or props['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:
@@ -395,13 +400,8 @@
                 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:
msg99 Author: [hidden] (richard) Date: 2002-01-08 03:58
Logged In: YES 
user_id=6405

I have fixed the code to ensure the problem (whatever it 
is caused by...!) doesn't occur again. Something very 
simlar to your patch.

History
Date User Action Args
2001-12-20 12:59:07grubertcreate