Edgewall Software

Opened 8 years ago

Closed 8 years ago

Last modified 6 years ago

#9452 closed defect (cantfix)

AttributeError: 'Ticket' object has no attribute 'is_writeable_field'

Reported by: lior Owned by:
Priority: low Milestone:
Component: general Version: 0.11.7
Severity: minor Keywords:
Cc: support@…
Release Notes:
API Changes:


When using the 'BatchModifyPlugin' to reset the Milestone on multiple tickets.

How to Reproduce

While doing a POST operation on /query, Trac issued an internal error.

(please provide additional details here)

Request parameters:

{'__FORM_TOKEN': u'b06ef247ce0b9094c8413414',
 'batchmod': u'Change tickets',
 'bmod_flag_comment': u'on',
 'bmod_flag_milestone': u'on',
 'bmod_modify_changetime': u'true',
 'bmod_value_comment': u'',
 'bmod_value_milestone': u'',
 'col': [u'id',
 'group': u'component',
 'query_href': u'/trac/venotion/query?status=assigned&status=new&status=reopened&group=component&order=priority&col=id&col=summary&col=milestone&col=status&col=priority&col=component&milestone=%21&sprint=&type=bug',
 'selectedTickets': u'1143,1277,1113'}

User Agent was: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US) AppleWebKit/533.4 (KHTML, like Gecko) Chrome/5.0.375.70 Safari/533.4

System Information

Trac 0.11.7
Python 2.6.4 (r264, May 30 2010, 13:35:10)
[GCC 4.3.4]
setuptools 0.6
SQLite 3.6.22
pysqlite 2.4.1
Genshi 0.5.1
mod_python 3.3.1
Pygments 1.3.1
Subversion 1.6.9 (r901367)
jQuery: 1.2.6

Python Traceback

Traceback (most recent call last):
  File "/usr/lib/python2.6/site-packages/trac/web/main.py", line 450, in _dispatch_request
  File "/usr/lib/python2.6/site-packages/trac/web/main.py", line 176, in dispatch
  File "/usr/lib/python2.6/site-packages/trac/web/main.py", line 296, in _pre_process_request
    chosen_handler = filter_.pre_process_request(req, chosen_handler)
  File "/var/trac/env/venotion/plugins/BatchModify-0.6.0_trac0.11-py2.6.egg/batchmod/web_ui.py", line 47, in pre_process_request
  File "/var/trac/env/venotion/plugins/BatchModify-0.6.0_trac0.11-py2.6.egg/batchmod/web_ui.py", line 94, in _batch_modify
    t.save_changes(req.authname, comment)
  File "/usr/lib/python2.6/site-packages/trac/ticket/model.py", line 299, in save_changes
    listener.ticket_changed(self, comment, author, old_values)
  File "/usr/lib/python2.6/site-packages/binary_agilo-", line 69, in ticket_changed
    current_sprint_name = self._current_sprint_name(ticket)
  File "/usr/lib/python2.6/site-packages/binary_agilo-", line 119, in _current_sprint_name
    return self._current_value(Key.SPRINT, ticket) or None
  File "/usr/lib/python2.6/site-packages/binary_agilo-", line 128, in _current_value
    if not ticket.is_writeable_field(fieldname) or not ticket[fieldname]:
AttributeError: 'Ticket' object has no attribute 'is_writeable_field'

Attachments (0)

Change History (5)

comment:1 Changed 8 years ago by Remy Blank

Cc: support@… added
Resolution: cantfix
Status: newclosed

comment:2 Changed 8 years ago by Felix Schwarz

Looks like the batch modification plugin is not compatible with Agilo. Please ask the author to use agilo.ticket.model.AgiloTicket instead of trac.model.ticket.Ticket when Agilo is loaded.

As a workaround you might want to try Agilo's CSV interface.

comment:3 Changed 8 years ago by JL San Martin


I have the same problem, so I modified the plugin to be compatible with Agilo. Here is the patch:

< from trac.ticket import TicketSystem, Ticket
> #from trac.ticket import TicketSystem, Ticket
> from agilo.ticket.api import AgiloTicketSystem
> from agilo.ticket.model import AgiloTicket
<         for field in TicketSystem(self.env).get_ticket_fields():
>         for field in AgiloTicketSystem(self.env).get_ticket_fields():
<                 t = Ticket(self.env, int(id))
>                 t = AgiloTicket(self.env, int(id))
<         ticketSystem = TicketSystem(self.env)
>         ticketSystem = AgiloTicketSystem(self.env)

comment:4 Changed 8 years ago by JL San Martin

I forgot to mention the patch is for the web_iu.py of the BatchModifyPlugin.

comment:5 Changed 6 years ago by trac.edgewall.org@…

Entered as https://trac-hacks.org/ticket/9682 - should have been entered there

Modify Ticket

Change Properties
Set your email in Preferences
as closed The ticket will remain with no owner.
The resolution will be deleted.
to The owner will be changed from (none) to the specified user.

Add Comment

E-mail address and name can be saved in the Preferences .
Note: See TracTickets for help on using tickets.