#10506 closed defect (fixed)
Ticket update fails with HTTP 500 if Agilo for Trac installed
Reported by: | Owned by: | Björn Harrtell | |
---|---|---|---|
Priority: | normal | Component: | GridModifyPlugin |
Severity: | critical | Keywords: | Agilo |
Cc: | Trac Release: | 0.12 |
Description
When trying to change a field from the query table, the browser issues an AJAX request like this:
http://trac.domain.ch/trac/Project/gridmod/update?_=1350658481047&ticket=1&component=SomeComp
With Agilo 1.3.8 installed along GridModifyPlugin 0.1.5 this results in the following exception:
File "build/bdist.linux-i686/egg/gridmod/web_ui.py", line 103, in process_request ticket.save_changes(author=req.authname, comment='updated by gridmod plugin') File "/opt/bitnami/python/lib/python2.6/site-packages/binary_agilo-1.3.8_PRO-py2.6.egg/agilo/ticket/model.py", line 819, in save_changes self._check_business_rules() File "/opt/bitnami/python/lib/python2.6/site-packages/binary_agilo-1.3.8_PRO-py2.6.egg/agilo/ticket/model.py", line 807, in _check_business_rules RuleEngine(self.env).validate_rules(self) File "/opt/bitnami/python/lib/python2.6/site-packages/binary_agilo-1.3.8_PRO-py2.6.egg/agilo/scrum/workflow/api.py", line 61, in validate_rules debug(self, "Called validate_rules(%s)" % ticket) File "/opt/bitnami/python/lib/python2.6/site-packages/binary_agilo-1.3.8_PRO-py2.6.egg/agilo/ticket/model.py", line 298, in __str__ repr(self.get_type())) TypeError: %d format: a number is required, not unicode
Reason: Agilo wraps Trac's ticket/model.py and uses the ticket id in transforming it to a string. In some cases the ticket is retrieved as a unicode literal (i.e. u'1' instead of an integer, causing the above error.
Fix: Make sure the id is passed on to the ticket instance as an integer. Patch attached.
Attachments (1)
Change History (3)
Changed 12 years ago by
Attachment: | gridmod_agilo_ticket_patch.diff added |
---|
comment:1 Changed 12 years ago by
Resolution: | → fixed |
---|---|
Status: | new → closed |
comment:2 Changed 12 years ago by
Replying to ps@novapp.ch:
[...]
http://trac.domain.ch/trac/Project/gridmod/update?_=1350658481047&ticket=1&component=SomeComp
The _=1350658481047
in the URL must come from Agilo, right?
Patch to pass ticket id as integer