Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Warn the user when OA has signed them out due to inactivity #24

Open
crittermike opened this issue Aug 20, 2014 · 1 comment
Open

Warn the user when OA has signed them out due to inactivity #24

crittermike opened this issue Aug 20, 2014 · 1 comment

Comments

@crittermike
Copy link
Contributor

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.

@ghost
Copy link

ghost commented Oct 28, 2014

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).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant