Modify

Opened 5 years ago

Closed 5 years ago

#5276 closed defect (worksforme)

listAttachments error

Reported by: rjs@… Owned by: athomas
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 5 years ago by osimons

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

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)

Add Comment

Modify Ticket

Action
as closed .
The resolution will be deleted. Next status will be 'reopened'.
Author


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

 
Note: See TracTickets for help on using tickets.