/
Transform editing window tracking [5.2.2-B2]

Transform editing window tracking [5.2.2-B2]

In-Portal has an editing window tracking system to prevent multiple users from editing the same record in parallel. It works like this:

  1. upon "Edit" button press in the grid:
    1. temporary table(-s) are created (table name contains "session id" and "window id") to hold edited record data
    2. check is made, that no similar temporary table (created by this or another user) exists already (means nobody is editing the same thing as I'm editing)
    3. if enabled by the developer, then the user is presented with an alert dialog showing who is editing the same data currently
  2. upon the "Cancel" button press in the editing window:
    1. the temporary tables are deleted
  3. upon the "Save" button press in the editing window:
    1. data is copied from the temporary table back to the live table
    2. the temporary tables are deleted
  4. upon direct window closing (the "X" icon pressing):
    1. the temporary tables created for that window are deleted

The current system has several drawbacks:

  • when, for some reason, a web browser fails to properly report window closing fact, then temporary table stay and particular database record appear as being edited, while in reality, they're not
  • all database tables need to be introspected to understand what records are being edited

Solution

Introduce real-time editing window tracking system (replaces current one), that works like this:

  • each editing window is being registered in the memory table (session id, window id, user, item prefix, item id)
  • each editing window periodically (configurable) reports back to inform, that it's still being opened
  • upon window closing, (save button, cancel button, "X" icon) information about the editing window is immediately removed along with associated temporary tables
  • a scheduled task periodically (configurable) looks for registered windows that failed (e.g. non-detected closed editing window) to report back and purges them (window record, temporary tables)

Related Tasks

INP-1809 - Getting issue details... STATUS