I am designing a tool within a webpage where users can check out a dataset, make changes to it, then check the data back in so that another user can work on it. I have covered the eventualities of users ending their session properly, or clicking out of the tool to another page, or becoming inactive when their browser window is still open. All of these situations can lead to the data being checked back in. However, how should I deal with users closing their browser window before they have checked the data back in? We need it to be checked back in relatively quickly (i.e. within a few hours) so that other people can work on it but can't program something to detect that their browser window has been closed because, according to our developers, that would be too "hacky".
The only similar behaviour I can think of is on Microsoft Sharepoint where, if a file is checked out, it remains checked out to the user even if they forget to check it back in, and you have to personally ask them to check it back in.
What is an accepted behaviour to use in this situation? Should we automatically check data back in after a certain amount of time, or leave it checked out and have a way of contacting the user to ask them to properly end their session?