Team Elements

Status: Caution PostgreSQL Open Source Initiative (OSI) Java
PUBLIC PROFILE

Back to topics

Developer Community

version system

You need to be logged in to post messages

version system

3/14/2007 7:32 PM EDT

It is so nice to see the system supports versions.

I did the following testing:

1. submit a file a1.txt with the subject "s1"
2. add a new version a2.txt with the subject "s2"
3. then I deleted the the version 2

I noticed that the file is displayed using the name "s2" and version number is 2.0 even the second version is deleted. When I clicked on the menu "Open File in New Window", it displays an empty window.

I am not sure this is the right behavior or not. Do you think the current version of the file should be 1.0 instead of 2.0?

1. 3/15/2007 11:48 AM EDT

I found the reason. There is a bug in the method updateVersion of FileItem.java. The following two lines

pst.setInt(++i, this.getId());
pst.setString(++i, comment);

should be

pst.setString(++i, comment);
pst.setInt(++i, this.getId());

2. 3/15/2007 1:58 PM EDT

After the latest version of a file is removed, the index for Lucene does get updated.

3. 3/15/2007 7:33 PM EDT
Default user photo

By Matt Rajkowski

Concursive Corporation
Product Design

airplane-icon-100x100.png

Thanks for finding this... the bug has been confirmed and updated as you suggested!

3 results found