when two users open the same project file, they don’t know it until they try to save the project, then it’s too late as the only solutions are to lose their modifications or lose the other user’s modifications. Is there any possibility to lock the file when it’s already open, just like in most Windows applications? Webdav is not an option as it is not possible to use it in our infrastructure.
If two or more persons open the same file from the shared drive then GanttProject will warn if someone is going to overwrite changes made by someone else. For that purpose GanttProject just remembers the last modification timestamp when it opens a file and compares the remembered value when user attempts to write. If value is the same at the moment of writing then file has not been changed and write is safe. If it is different then file has been changed and GanttProject suggests creating a new file.
Thus, this is not quite true:
as the only solutions are to lose their modifications or lose the other user’s modifications
They can save their modifications in different files.
thanks for your quick answer. You are right, they could save in two different files, but practically it doesn’t help, since the goal is to have a common project file, maintained by several users. Is there no way to implement the same type of file locking as you have in Word or Excel, where the application can warn the user at the moment he attempts to open a file that is already open by another user?
Same problem here. File is on nas folder. If I make a little change and save immediately when file is opened by other user there is no alert. So I think file is free. Then i work in the file (and other user too) so I want to save. Other user have already save his modification, so in my screen appear the warn that advise me that file is changed since it was opened.
Now, I can only discard oll my work or discard all the work of other user (maybe better ).
the chance to save with different filename is useless because we want to manage everithing inside same file.
is it there no way to manage this lock? it could awesome if warn indicate also the name of the user!
Let t0 be the moment when other user opened the file. GanttProject remembers the last file sync timestamp and for other user sync timestamp is t0
If I make a little change and save immediately when file is opened by other user there is no alert.
Let this moment be t1. File write timestamp is changed to t1 and your sync timestamp is t1
Then i work in the file (and other user too) so I want to save. Other user have already save his modification
Unless there is a bug, other user can’t save his changes without warning. He has t0 as file sync timestamp and sees t1>t0 as file modification timestamp. But he may also choose to overwrite the file. Let t2 be this moment. If other user overwrites the changes, file modification timestamp becomes t2
Now you have the sync timestamp t1 and see modification timestamp t2>t1. And you see the warning which is expected. You may choose to overwrite and you may choose to save a copy.
This is the essential minimum which can be provided on application level without additional middleware in heterogeneous environment (different operating systems and file systems). If you really need locking or version control, you need to use additional software, like WebDAV server or version control system.
GanttProject can work with WebDAV servers. If your WebDAV server supports locking then you will see the lock if any and even will see the user name who keeps the lock. If you’re working in the local network, you can probably install Apache or IIS with WebDAV and locks.
Thanks Dmitry, all you said is true. but when appear the worn is too late, the real feature is to manage the lock just like word and excel.
Maybe WebDAV is the only way to follow, but I have no experience in this field. Is it free?
WebDAV is a protocol, like HTTP. There are many implementations with different sets of features. Apache+mod_dav and Microsoft IIS are arguably the most popular. But you’d better talk to your IT department on this matter (unless you are that department :))