Issue Details (XML | Word | Printable)

Key: CONF-10269
Type: Bug Bug
Status: Resolved Resolved
Resolution: Fixed
Priority: Major Major
Assignee: Richard Wallace [Atlassian]
Reporter: Richard Wallace [Atlassian]
Votes: 0
Watchers: 1
Operations

If you were logged in you would be able to see more operations.
Confluence

ContentEntityObject.getAttachmentNamed() doesn't return the latest version of attachment

Created: 17/Dec/07 05:48 PM   Updated: 16/Jan/08 12:30 AM
Component/s: Attachments
Affects Version/s: None
Fix Version/s: 2.7.1

Time Tracking:
Not Specified

Participants: Jonathan Nolen [Atlassian], Per Fragemann [Atlassian] and Richard Wallace [Atlassian]
Since last comment: 39 weeks, 6 days ago
Resolution Date: 16/Jan/08 12:30 AM
Labels:


 Description  « Hide
The ContentEntityObject.getAttachmentNamed(String name) simply returns the first occurance of the attachment with the given name from the list of attachments. This may not always be the newest version. When working on the calendar plugin I encountered a case where the version order in the attachments for a file were [v2, v1, v3]. Version 2 of the attachment was always returned from the getAttachmentNamed() method instead of the expected version 3.

 All   Comments   Work Log   Change History      Sort Order: Ascending order - Click to sort in descending order
Jonathan Nolen [Atlassian] added a comment - 18/Dec/07 11:27 AM
I would rate the internal value of this one pretty highly as this will affect the calendar plugin, the webdav plugin, and possibly others.

Per Fragemann [Atlassian] added a comment - 01/Jan/08 07:34 PM
please check whether review necessary or not, and please verify my complaint about the missing testcase.