Issue 118983

Summary: Wrong user name when opening file already Opened by OOo
Product: Writer Reporter: pmacias
Component: editingAssignee: AOO issues mailing list <issues>
Status: UNCONFIRMED --- QA Contact: Peggy Fobbe <psfobbe.qa>
Severity: Normal    
Priority: P3 CC: dorel.natea, elish, kathrin_schellmann
Version: version58Keywords: needhelp
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Issue Type: DEFECT Latest Confirmation in: ---
Developer Difficulty: ---
Attachments:
Description Flags
open file in word on two different computers
none
open file in word on one computer and on writer on another one
none
open file in writer on one computer and on word on another one
none
open file in writer on two different computers none

Description pmacias 2012-02-27 20:44:21 UTC
Hi I'm a Windows System Administrator. In my network environment, I have users that use MS Office XP - 2010, as well as users that use OOo 3.3. Here is a scenario that has been brought to my attention and after testing, it happens every time.

Everytime a user using MS Office attempts to open up a .doc file or excel file that is already open by a user using OOo, the MS Office user gets message stating that the file is "already locked for editing" and its states the user who is locking it.

However, the user that OOo states is locking the file is ALWAYS either the wrong user or "unknown User". For instance lets say "Tom", a MS Office user, is trying to open an excel sheet on a server. However he get a message that the file is already locked by "Bill", but come to find out, Bill doesn't have the file opened . . . he never even knew it existed. 

I eventually find our that its "Brian"(a OOo user) who has it opened. Why is this happening? It happens in the opposite way as well. If Brian, the OOo user, tries to open a .doc or excel file that is already opened by a MS Office user, he gets message stating that its locked by "unknown User". 

Please help!!!
Comment 1 Dorel 2015-01-24 20:57:05 UTC
Created attachment 84461 [details]
open file in word on two different computers
Comment 2 Dorel 2015-01-24 20:59:41 UTC
Created attachment 84462 [details]
open file in word on one computer and on writer on another one
Comment 3 Dorel 2015-01-24 21:00:11 UTC
Created attachment 84463 [details]
open file in writer on one computer and on word on another one
Comment 4 Dorel 2015-01-24 21:01:29 UTC
Created attachment 84464 [details]
open file in writer on two different computers
Comment 5 Dorel 2015-01-24 21:05:31 UTC
The issue is that in some cases the user is shown as “unknown” user (see below) or as another user. 

.doc / .odt filetype

                     Microsoft Word          |             AOO Writer
MS Word    “locked by userName” message  | “locked for editing by Unknown User” 
AOO Writer “locked for editing by another user” |  “locked by userName” message


Description of steps:

1. Open a document in Microsoft Word (or create and open it)
2. Share the document over the network
3. Open the document from the network (on another computer) using AOO Writer

Microsoft Word and AOO Writer can be inter-switched - the document may be created in AOO Writer and opened in Microsoft Word.

Actual:

A message is shown informing the user that the document is opened by "Unknown User" (AOO Writer) / "another user" (Microsoft Word), although opening the document using the same office suite user's name is shown.

See attached screenshots:
Word – Word: file created in Word and opened in Word
Word – Writer: file created in Word and opened in Writer
Writer – Word: file created in Writer and opened in Word
Writer – Writer: file created in Writer and opened in Writer

The issue also reproduced when using LibreOffice Writer instead of AOO Writer.


Expected:

When opening a file opened by another user, the user is expecting to see the name of the user that opened the file.
Opening the file using the same office suite the name of the person that already opened the file is shown in the message box.


Configurations used:

1. OS
Mac OS X Yosemite (10.10.1)
Windows 7 Pro x64
Windows 8.1 Pro x64

2. Office suite
Microsoft Office 2007
AOO Writer 4.1.1
AOO Writer 4.2.0
Libre Office 4.3.5

Different cases / scenarios that might point to the problem:

Case 1 – different file formats:

While investigation I found that bot Microsoft Office and Open Office store the name of the user that has the file opened in a temporary file:

-Open Office temp file (.~lock.filename.odt#) contains:
firstName lastName, ComputerName/Username,computerName,date hour, file:///C:/Users/Username/AppData/Roaming/OpenOffice/4;

-Microsoft Office (~$test2):
Username                                             U s e r n a m e   M S   G o t h i c           Ŕ 3           Đ 3  

As it can be seen, different formats are used by the office suites – this may indicate a problem in interpreting the contents of the file by another office suite (in this case AOO Writer).

Case 2 – improper quitting of Writer:

Quitting improperly (killing the office process; AOO crashes; etc.) and therefore, not deleting the owner file (.~lock) the file appears as being opened by the user that previously opened the file (the user for which the office suite quitted improperly). 

If the same user tries to open the file, it appears as being locked by himself.
Deleting the owner file (.~lock) while another user still has the message box shown on the screen, trying to open the file the message “locked for editing by Unknown User” is shown.
This issue might be transformed in another bug.



Impact of the bug:

There is a high chance that users encounter this behavior, especially if more users have to edit the same file.
In my personal experience I encountered this when in my company we used a network file for our daily reports and there were many persons trying to edit the same file.
It was useful to know who was last editing the file in case something happened (e.g. case 2 above) and the file could not be opened for some time.


Similar bugs:

Searching the bug database for similar issues, I could not find any.


If a user opens the file in Word and another user opens the file in Writer (or vice-versa) – the message shown is “locked for editing by Unknown User” - this might be a issue on how AOO reads contents from lock files of other office suites (see Case 1 above).

If opening the file it is locked by another person Case 2 above might apply. A partial solution for this is to check that the file is not opened in another place, deleting the .~lock file and then opening the file.

In order to figure out the exact case the reporter is encountering, some exact steps on how the reporter reproduced the issue would help.
Comment 6 Kathrin Schellmann 2016-10-22 21:44:04 UTC
Kathrin Schellmann retesting this issue on the 22.10.2016

For my tests I used two computers:
1. Windows 10 Pro N 64bit with Open Office 4.12 [(Build:9782) - Rev. 1709696] and MS Office 2007 [(12.06758.5000) SP3 MSO (12.0.6755.5000)]
2. Windows 10 Pro 64bit with Open Office 4.12 [(Build:9782) - Rev. 1709696] and MS Office 2007 [(12.0.4518.1014) MSO (12.0.4518.1014)]


I prepared several documents for my tests and stored them in a folder that was shared in the network:
•	ODS (made in MS Excel and in OpenOffice) 
•	ODT (made in MS Word and in OpenOffice)
•	ODP (made in MS Power Point and in OpenOffice)
•	DOC (made in MS Word and in OpenOffice)
•	DOCX (made in MS Word)
•	XLS (made in MS Excel and in OpenOffice)
•	XLSX (made in MS Excel)
•	PPT (made in MS Power Point and in OpenOffice)
•	PPTX (made in MS Power Point)


Test steps:
1. Open a document on PC 1 with user1
2. Open the same document on PC 2 with user2


Results:
Opening the document in the same office suite on both computers, e.g. in OpenOffice, results in the correct current user name (user1) shown in the 'document in use' info box.

Opening the document in a different office suite on both computers (e.g. MS Word on PC 1 and Open Office on PC 2) results in "unknown user" (AOO)/"different user" (MS Office) shown in the 'document in use' info box instead of the correct current user name.

All the above-mentioned formats showed the same behaviour. Creating one format in different office suites did not change the outcome of the test; A DOC file made in MS Word behaved the same as one made in OpenOffice.
I could not recreate the bug with the wrong user shown in the 'document in use' info box, but that might be my lack of more users in my network.


Expected results:
Opening a document in different office suites on multiple computers at the same time shows the correct current user name in the 'document in use' info box.


Opening a document that is currently in use is a frequent occurrence in a company where multiple users work on the same document. Knowing who exactly works on it, makes it possible to make faster arrangements to release the document for another user and it helps with trouble-shooting in case the document is still locked although it was saved & closed by the previous user.