Modify

Opened 16 years ago

Closed 16 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 16 years ago by osimons

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. Next status will be 'reopened'.

Add Comment


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

 
Note: See TracTickets for help on using tickets.