On Monday, March 24, 2014 9:58:23 AM UTC-7, ivanelson wrote:
>
> Always this error occurs. When will I assign a ticket.
>
> I noticed that this only occurs in the ticket's created [1] email2trac.
> The plugin is being broken TracjsGantt.
>
> [1] https://oss.trac.surfsara.nl/email2trac
>
> Traceback (most recent call last):
>> File
>> "/usr/local/lib/python2.7/dist-packages/Trac-1.0-py2.7.egg/trac/web/main.py",
>>
>> line 497, in _dispatch_request
>> dispatcher.dispatch(req)
>> File
>> "/usr/local/lib/python2.7/dist-packages/Trac-1.0-py2.7.egg/trac/web/main.py",
>>
>> line 214, in dispatch
>> resp = chosen_handler.process_request(req)
>> File
>> "/usr/local/lib/python2.7/dist-packages/Trac-1.0-py2.7.egg/trac/ticket/web_ui.py",
>>
>> line 179, in process_request
>> return self._process_ticket_request(req)
>> File
>> "/usr/local/lib/python2.7/dist-packages/Trac-1.0-py2.7.egg/trac/ticket/web_ui.py",
>>
>> line 614, in _process_ticket_request
>> self._do_save(req, ticket, action)
>> File
>> "/usr/local/lib/python2.7/dist-packages/Trac-1.0-py2.7.egg/trac/ticket/web_ui.py",
>>
>> line 1328, in _do_save
>> replyto=req.args.get('replyto'))
>> File
>> "/usr/local/lib/python2.7/dist-packages/Trac-1.0-py2.7.egg/trac/ticket/model.py",
>>
>> line 363, in save_changes
>> listener.ticket_changed(self, comment, author, old_values)
>> File
>> "/usr/local/lib/python2.7/dist-packages/Trac_jsGantt-0.10-py2.7.egg/tracjsgantt/tracpm.py",
>>
>> line 2957, in ticket_changed
>> self.rescheduleTickets(ticket, old_values)
>> File
>> "/usr/local/lib/python2.7/dist-packages/Trac_jsGantt-0.10-py2.7.egg/tracjsgantt/tracpm.py",
>>
>> line 2766, in rescheduleTickets
>> self.spliceGraph(tickets, ticket, old_values)
>> File
>> "/usr/local/lib/python2.7/dist-packages/Trac_jsGantt-0.10-py2.7.egg/tracjsgantt/tracpm.py",
>>
>> line 2667, in spliceGraph
>> if len(old_values[previewFields[fwd]]) == 0:
>> TypeError: object of type 'NoneType' has no len()
>
>
>
>
> @ivanelson
> []s
>
I won't venture a guess as to why this is only occurring with email2trac,
but the following patch might work around the problem:
diff --git a/tracjsganttplugin/0.11/tracjsgantt/tracpm.py
b/tracjsganttplugin/0.
index 102bb6f..b6df829 100644
--- a/tracjsganttplugin/0.11/tracjsgantt/tracpm.py
+++ b/tracjsganttplugin/0.11/tracjsgantt/tracpm.py
@@ -2954,7 +2954,8 @@ class TicketRescheduler(Component):
if self._affectsSchedule(ticket, old_values):
self.env.log.info('Changes to %s affect schedule.
Rescheduling.' %
ticket.id)
- self.rescheduleTickets(ticket, old_values)
+ if old_values:
+ self.rescheduleTickets(ticket, old_values)
def ticket_deleted(self, ticket):
--
You received this message because you are subscribed to the Google Groups "Trac
Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/trac-users.
For more options, visit https://groups.google.com/d/optout.