Modify

Opened 9 years ago

Closed 8 years ago

#5276 closed defect (worksforme)

listAttachments error

Reported by: rjs@… Owned by: Alec Thomas
Priority: high Component: XmlRpcPlugin
Severity: critical Keywords:
Cc: Trac Release: 0.11

Description

Durring our development using XmlRpcPlugin from java, we found a problem with listAttachments function. The error message says that the object Attachment doesn't contain attribute "time". We managed to solve this problem by changing t.time with t.date in file ticket.py, method listAttachments and recompile the plugin. Below you can find the old method and the new one:

old method - def listAttachments(self, req, ticket):

""" Lists attachments for a given ticket. Returns (filename, description, size, time, author) for each attachment.""" for t in Attachment.select(self.env, 'ticket', ticket):

yield (t.filename, t.description or , t.size, t.time, t.author)

new method - def listAttachments(self, req, ticket):

""" Lists attachments for a given ticket. Returns (filename, description, size, time, author) for each attachment.""" for t in Attachment.select(self.env, 'ticket', ticket):

yield (t.filename, t.description or , t.size, t.date, t.author)

Attachments (0)

Change History (1)

comment:1 Changed 8 years ago by Odd Simon Simonsen

Resolution: worksforme
Status: newclosed

This seems to be fixed as part of [2609] - and current line now looks like:

            yield (t.filename, t.description or '', t.size, 
                   to_datetime(t.date), t.author)

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Alec Thomas.
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.