You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Right now, weird things (like task options not populating correctly when adding time) happen when OA has signed the user out without the user knowing. We should detect that and alert the user, and provide a link to sign in again.
The text was updated successfully, but these errors were encountered:
Since there is also a lot of data loss for users who have a timesheet open but forget to save, or close their machine and lose their session without having saved timesheet entries, it would be good to be able to restore the "pending" changes so they aren't lost.
As we discussed, this could be achieved by storing the temporary timesheet data locally (as a user enters their time, store it in a local HTML5 data store, clear the store after the user clicks "save" to post data back to the server). When/if the user session expires and the user is on the timesheet entry page, the popup warning this ticket describes would give them the option to "log in and attempt to restore unsaved timesheet entries" or "log in and discard unsaved timesheet entries". If the user chooses to attempt to restore unsaved timesheet entries, the plugin re-adds the timesheet entries which were stored in the local HTML5 data store.
Technical issues to consider:
what if the user has two or more tabs open with the same timesheet open and different pending values - should all of these values be restored to the one tab, or should the plugin take the tab the entries existed on into account
what if the user has two or more tabs open with different timesheets open (different weeks, for example), and there are pending changes - how will the plugin differentiate which time entries go on which timesheet (should this be simply tab based?)
what if the user no longer has access to a task that the plugin is attempting to restore (need error handling)
what if the user's login fails, how long do we hold onto the temp data, and does it follow the tab until the tab is closed, and continue to try and pop up a restore option for the user if the user revisits the openair timesheet entry page (and what if the user accidentally opened the wrong timesheet, wants to say no now, but wants to open the correct timesheet to attempt to apply the lost changes) - perhaps this data should be stored similar to the git concept of a "stash", and the user simply clicks the openair plugin icon to get a dropdown of time entry stashes to apply to the current timesheet?
Simple to implement the base concept with the assumption of only one OA tab open at any given point, but certainly worthy of further consideration for multi-tab situations and login failure situations (perhaps as a separate ticket).
Right now, weird things (like task options not populating correctly when adding time) happen when OA has signed the user out without the user knowing. We should detect that and alert the user, and provide a link to sign in again.
The text was updated successfully, but these errors were encountered: