I use batchmodifyplugin/0.11/trunk@8347 and Trac 0.11.7.
When I submit "Batch Modify" form, I get the following error.
2010-08-12 16:47:51,177 Trac[main] ERROR: Internal Server Error:
Traceback (most recent call last):
File "/usr/lib/python2.4/site-packages/Trac-0.11.7.ja1-py2.4.egg/trac/web/main.py", line 450, in _dispatch_request
dispatcher.dispatch(req)
File "/usr/lib/python2.4/site-packages/Trac-0.11.7.ja1-py2.4.egg/trac/web/main.py", line 176, in dispatch
chosen_handler)
File "/usr/lib/python2.4/site-packages/Trac-0.11.7.ja1-py2.4.egg/trac/web/main.py", line 296, in _pre_process_request
chosen_handler = filter_.pre_process_request(req, chosen_handler)
File "build/bdist.linux-x86_64/egg/batchmod/web_ui.py", line 68, in pre_process_request
File "build/bdist.linux-x86_64/egg/batchmod/web_ui.py", line 150, in process_request
File "build/bdist.linux-x86_64/egg/batchmod/web_ui.py", line 177, in _save_ticket_changes
NameError: global name 'selectedTickets' is not defined
The patch fixes the issue.
Index: batchmod/web_ui.py
===================================================================
--- batchmod/web_ui.py (revision 8354)
+++ batchmod/web_ui.py (working copy)
@@ -146,8 +146,8 @@
if not selectedTickets:
raise TracError, 'No tickets selected'
- self._save_ticket_changes(req, selectedTickets, tickets,
- values, comment)
+ self._save_ticket_changes(req, env, log, selectedTickets, tickets,
+ values, comment, modify_changetime)
def _get_new_ticket_values(self, req, env):
"""Pull all of the new values out of the post data."""
@@ -172,8 +172,8 @@
if values.has_key('status') and values['status'] is not 'closed':
values['resolution'] = ''
- def _save_ticket_changes(self, req, selected_tickets, tickets,
- new_values, comment):
+ def _save_ticket_changes(self, req, env, log, selectedTickets, tickets,
+ values, comment, modify_changetime):
for id in selectedTickets:
if id in tickets:
t = Ticket(env, int(id))