Opened 22 months ago

Closed 22 months ago

Last modified 22 months ago

#10506 closed defect (fixed)

Ticket update fails with HTTP 500 if Agilo for Trac installed

Reported by: ps@… Owned by: bjornharrtell
Priority: normal Component: GridModifyPlugin
Severity: critical Keywords: Agilo
Cc: Trac Release: 0.12


When trying to change a field from the query table, the browser issues an AJAX request like this:

With Agilo 1.3.8 installed along GridModifyPlugin 0.1.5 this results in the following exception:

  File "build/bdist.linux-i686/egg/gridmod/", 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/", line 819, in save_changes
  File "/opt/bitnami/python/lib/python2.6/site-packages/binary_agilo-1.3.8_PRO-py2.6.egg/agilo/ticket/", line 807, in _check_business_rules
  File "/opt/bitnami/python/lib/python2.6/site-packages/binary_agilo-1.3.8_PRO-py2.6.egg/agilo/scrum/workflow/", 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/", line 298, in __str__
TypeError: %d format: a number is required, not unicode  

Reason: Agilo wraps Trac's ticket/ 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)

gridmod_agilo_ticket_patch.diff (1.4 KB) - added by ps@… 22 months ago.
Patch to pass ticket id as integer

Download all attachments as: .zip

Change History (3)

Changed 22 months ago by ps@…

Patch to pass ticket id as integer

comment:1 Changed 22 months ago by rjollos

  • Resolution set to fixed
  • Status changed from new to closed

(In [12223]) Fixes #10506: Cast ticket ID to an int before passing to the Ticket constructor to avoid an exception with AgiloTrac. Thanks to ps@… for the patch.

comment:2 in reply to: ↑ description Changed 22 months ago by rjollos

Replying to


The _=1350658481047 in the URL must come from Agilo, right?

Add Comment

Modify Ticket

as closed .
as The resolution will be set. Next status will be 'closed'.
to The owner will be changed from bjornharrtell. Next status will be 'closed'.
The resolution will be deleted. Next status will be 'reopened'.

E-mail address and user name can be saved in the Preferences.

Note: See TracTickets for help on using tickets.