Opened 6 years ago

Closed 6 years ago

Last modified 6 years ago

#10506 closed defect (fixed)

Ticket update fails with HTTP 500 if Agilo for Trac installed

Reported by: ps@… Owned by: Björn Harrtell
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@… 6 years ago.
Patch to pass ticket id as integer

Download all attachments as: .zip

Change History (3)

Changed 6 years ago by ps@…

Patch to pass ticket id as integer

comment:1 Changed 6 years ago by Ryan J Ollos

Resolution: fixed
Status: newclosed

(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 6 years ago by Ryan J Ollos

Replying to


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

Modify Ticket

Change Properties
Set your email in Preferences
as closed The owner will remain Björn Harrtell.
The resolution will be deleted.

Add Comment

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

Note: See TracTickets for help on using tickets.