Opened 12 years ago

Closed 12 years ago

Last modified 12 years ago

#238 closed bug (invalid)

problem about check in file

Reported by: beikesea Owned by:
Priority: minor Milestone:
Component: Import / Export Version: 6.5
Keywords: Cc:

Description

There is a serious problem about check in file:

  1. upload a.txt to the logicaldoc
  2. check out a.txt
  3. check in the another file such as b.txt and logicaldoc will alter that file name is wrong. And then I close the dialog.
  4. check in b.txt again
  5. check in the new version file(a.txt) to the logicaldoc

Now I find the problem that a.txt is replaced by b.txt!
And in the file attribute, the title attribute is a.txt but the file attribute shows b.txt.

Change History (6)

comment:1 Changed 12 years ago by beikesea

logicaldoc version : 6.5
language: chinese
explorer: ie 9

comment:2 Changed 12 years ago by beikesea

  • Component changed from Core to Import / Export

comment:3 follow-up: Changed 12 years ago by car031

  • Milestone 6.5.1 deleted
  • Priority changed from Major to Minor
  • Resolution set to invalid
  • Status changed from new to closed

This behaviour is the correct one. Normally you should use every time the same file name, but if you cant you can uncheck the checkbox and force LogicalDOC do use another file name.
If you do so, it is normal that the file name is changed but the title will remain unchanged.
This is ok since title and filename are two distinct metadata.
Of course when you create a new document, LogicalDOC will propose you to use the file name itself as title but it is just a choice, you can change the title at your will.

comment:4 in reply to: ↑ 3 Changed 12 years ago by beikesea

But I wish the file is replaced by the last upload file(a.txt for new version) not b.txt, and my staff always check in the wrong file, how can I do?

Replying to car031:

This behaviour is the correct one. Normally you should use every time the same file name, but if you cant you can uncheck the checkbox and force LogicalDOC do use another file name.
If you do so, it is normal that the file name is changed but the title will remain unchanged.
This is ok since title and filename are two distinct metadata.
Of course when you create a new document, LogicalDOC will propose you to use the file name itself as title but it is just a choice, you can change the title at your will.

Last edited 12 years ago by beikesea (previous) (diff)

comment:5 follow-up: Changed 12 years ago by car031

Prepare the right file in your desktop.
Do checkout on the actual document.
Do checkin and upload the right file.

comment:6 in reply to: ↑ 5 Changed 12 years ago by beikesea

I have find the reason.

In the UploadServlet?.java
When I check in file, the system will put the file information to the map.
If I check in wrong file to the system and close the dialog at th same time, the map will not be clean.

And in the checkin method for DocumentServiceImpl?.java
The problem is :

File file = uploadedFilesMap.values().iterator().next();

I think it is wrong. It always get a file from map by random when there are some files.

So I make the Hashtable to LinkedHashMap? and I get last file from map in the checkin method.

Replying to car031:

Prepare the right file in your desktop.
Do checkout on the actual document.
Do checkin and upload the right file.

Note: See TracTickets for help on using tickets.