Page MenuHomeIn-Portal Phabricator

INP-1809 - Introduce active editing window tracking system
AcceptedPublic

Authored by alex on Jul 6 2021, 4:58 AM.

Details

Reviewers
erik
Test Plan

Plan 0 (install/upgrade)

  1. perform clean install
  2. login to Admin Console
  3. go to ConfigurationUsersGeneral section
  4. confirm, that Editing Window Manager Ping Interval system setting is present there
  5. perform an upgrade
  6. login to Admin Console
  7. go to ConfigurationUsersGeneral section
  8. confirm, that Editing Window Manager Ping Interval system setting is present there

Part 1 (popup duplicate reporting)

  1. login to Admin Console in Web Browser A
    1. set Editing Window Style to Popup Window and save changes
    2. reload whole frameset (Command+R on Mac, F5 on Windows)
    3. go to Website & ContentStructure & Data section, then Directory sub-category, then Links tab
    4. ensure, that at least 2 records are present
    5. open 1st record for editing
    6. confirm, that duplicate editing window isn't shown
    7. while keeping editing popup open try opening 1st record for editing again
    8. confirm, that you're faced with an alert window explaining duplicate editing issue
    9. close 2nd edting window (where alert dialog was shown)
  2. login to Admin Console in Web Browser B
    1. go to Website & ContentStructure & Data section, then Directory sub-category, then Links tab
    2. open 1st record for editing
    3. confirm, that you're faced with an alert window explaining duplicate editing issue

Part 2 (modal duplicate reporting)

  1. login to Admin Console in Web Browser A
    1. set Editing Window Style to Modal Window and save changes
    2. reload whole frameset (Command+R on Mac, F5 on Windows)
    3. go to Website & ContentStructure & Data section, then Directory sub-category, then Links tab
    4. ensure, that at least 1 record is present
    5. open 1st record for editing
    6. confirm, that duplicate editing window isn't shown
  2. login to Admin Console in Web Browser B
    1. go to Website & ContentStructure & Data section, then Directory sub-category, then Links tab
    2. open 1st record for editing
    3. confirm, that you're faced with an alert window explaining duplicate editing issue

Part 3 (temporary table removal)

  1. login to Admin Console
  2. set Editing Window Style to Modal Window and save changes
  3. reload whole frameset (Command+R on Mac, F5 on Windows)
  4. go to Website & ContentStructure & Data section, then Directory sub-category, then Links tab
  5. ensure, that at least 1 record is present
  6. open 1st record for editing
  7. confirm, that temporary tables were created in the database
  8. close editing window using X icon (in the top right/left corner of the window; not the toolbar buttons)
  9. wait 2 seconds (AJAX request for window closing is executed after 2 seconds)
  10. confirm, that temporary tables were removed from the database
  11. repeat this plan part, but with Editing Window Style set to Popup Window and save changes

Part 4 (editing of several records)

  1. login to Admin Console in Web Browser A
    1. go to Website & ContentStructure & Data section, then Directory sub-category, then Links tab
    2. ensure, that at least 3 records are present
    3. open 1st and 2nd records record for editing
    4. confirm, that duplicate editing window isn't shown
  2. login to Admin Console in Web Browser B
    1. go to Website & ContentStructure & Data section, then Directory sub-category, then Links tab
    2. open 1st record for editing
    3. confirm, that you're faced with an alert window explaining duplicate editing issue
    4. close this editing window
    5. open 1st and 3rd record for editing
    6. confirm, that you're faced with an alert window explaining duplicate editing issue
    7. close this editing window

Part 5 (tracking system doesn't extend session)

  1. login to Admin Console
  2. locate used Session ID (debugger or cookies)
  3. go to Website & ContentStructure & Data section, then Directory sub-category, then Links tab
  4. open any link for editing
  5. remember UserSessions.LastAccessed value for above remembered session id
  6. open Web Browser Inspector window on a Network tab
  7. wait until AJAX request to "OnTrackEditingWindowAJAX" event is made
  8. confirm, that UserSessions.LastAccessed value wasn't changed for above remembered session id

Plan 6 (duplicate record window tracking)

  1. login to Admin Console
  2. locate used Session ID (debugger or cookies)
  3. go to Website & ContentStructure & Data section, then Directory sub-category, then Links tab
  4. open any link for editing
  5. open the same link for editing again (without closing any previously opened editing windows)
  6. open the same link for editing again (without closing any previously opened editing windows)
  7. confirm, that for each of the editing windows there is:
    • a matching set of the temporary tables in the database
    • a matching record in the EditingWindowManager memory table
  8. close 3rd opened editing window via Cancel toolbar button
  9. confirm, that both editing tables and a record from the EditingWindowManager memory table were removed
  10. close 2nd opened editing window via red X button of the window itself (not in the HTML)
  11. confirm, that both editing tables and a record from the EditingWindowManager memory table were removed
  12. close 1st opened editing window

Plan 7 (new record tracking)

  1. login to Admin Console
  2. locate used Session ID (debugger or cookies)
  3. go to Website & ContentStructure & Data section, then Directory sub-category, then Links tab
  4. open a new link creation popup/modal window
  5. confirm, that for an adding window there is:
    • a matching set of the temporary tables in the database
    • a matching record in the EditingWindowManager memory table
  6. close opened adding window via red X button of the window itself (not in the HTML)
  7. confirm, that both editing tables and a record from the EditingWindowManager memory table were removed

Diff Detail

Repository
rINP In-Portal
Branch
/in-portal/branches/5.2.x
Lint
Lint ErrorsExcuse: Added code hasn't introduced any new errors.
SeverityLocationCodeMessage
Errorcore/kernel/db/db_event_handler.php:169PHPCS.E.CodingStandard.Arrays.Array.SpaceAfterKeywordCodingStandard.Arrays.Array.SpaceAfterKeyword
Errorcore/kernel/db/db_event_handler.php:169PHPCS.E.Generic.PHP.LowerCaseKeyword.FoundGeneric.PHP.LowerCaseKeyword.Found
Errorcore/kernel/db/db_event_handler.php:170PHPCS.E.CodingStandard.Arrays.Array.SpaceAfterKeywordCodingStandard.Arrays.Array.SpaceAfterKeyword
Errorcore/kernel/db/db_event_handler.php:170PHPCS.E.Generic.PHP.LowerCaseKeyword.FoundGeneric.PHP.LowerCaseKeyword.Found
Errorcore/kernel/db/db_event_handler.php:362PHPCS.E.CodingStandard.Commenting.DocComment.NonParamGroupCodingStandard.Commenting.DocComment.NonParamGroup
Errorcore/kernel/db/db_event_handler.php:363PHPCS.E.CodingStandard.Commenting.DocComment.NonParamGroupCodingStandard.Commenting.DocComment.NonParamGroup
Errorcore/kernel/db/db_event_handler.php:3522PHPCS.E.CodingStandard.Classes.ClassDeclaration.SpaceBeforeCloseBraceCodingStandard.Classes.ClassDeclaration.SpaceBeforeCloseBrace
Errorcore/units/admin/admin_events_handler.php:771PHPCS.E.CodingStandard.NamingConventions.ValidFunctionName.ScopeNotCamelCapsCodingStandard.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
Errorcore/units/helpers/helpers_config.php:80PHPCS.E.CodingStandard.Arrays.Array.SpaceAfterKeywordCodingStandard.Arrays.Array.SpaceAfterKeyword
Errorcore/units/helpers/helpers_config.php:80PHPCS.E.Generic.PHP.LowerCaseKeyword.FoundGeneric.PHP.LowerCaseKeyword.Found
Errorcore/units/helpers/helpers_config.php:81PHPCS.E.CodingStandard.Arrays.Array.SpaceAfterKeywordCodingStandard.Arrays.Array.SpaceAfterKeyword
Errorcore/units/helpers/helpers_config.php:81PHPCS.E.Generic.PHP.LowerCaseKeyword.FoundGeneric.PHP.LowerCaseKeyword.Found
Unit
No Unit Test Coverage
Build Status
Buildable 1118
Build 1118: arc lint + arc unit

Event Timeline

alex created this revision.Jul 6 2021, 4:58 AM
alex requested review of this revision.Jul 6 2021, 4:58 AM
alex edited the test plan for this revision. (Show Details)Jul 6 2021, 5:00 AM
alex added a project: Restricted Project.
alex updated this revision to Diff 1023.Jul 16 2021, 9:43 AM
  • adding support for multiple ID editing in same window
  • fixed usage of In-Portal 5.1.x table/column names
alex edited the test plan for this revision. (Show Details)Jul 16 2021, 9:52 AM
alex updated this revision to Diff 1024.Jul 16 2021, 10:00 AM

Reduce ItemIDs column size to confirm with MySQL memory table specifications (index size of 3096 bytes).

erik accepted this revision.Jul 21 2021, 9:35 AM
This revision is now accepted and ready to land.Jul 21 2021, 9:35 AM
alex updated this revision to Diff 1026.Aug 12 2021, 7:34 AM

Editing window tracking AJAX requests no longer auto-extend session lifetime.

alex edited the test plan for this revision. (Show Details)Aug 12 2021, 7:44 AM
alex edited the test plan for this revision. (Show Details)Aug 12 2021, 9:24 AM
alex planned changes to this revision.Apr 5 2022, 7:20 AM
alex edited the test plan for this revision. (Show Details)
alex updated this revision to Diff 1034.Apr 5 2022, 7:41 AM

Added support for tracking duplicate windows (e.g. when same record is being edited in multiple windows).

This revision is now accepted and ready to land.Apr 5 2022, 7:41 AM
alex requested review of this revision.Apr 5 2022, 7:43 AM
erik accepted this revision.Apr 6 2022, 12:49 PM
This revision is now accepted and ready to land.Apr 6 2022, 12:49 PM
alex planned changes to this revision.Aug 17 2022, 3:56 AM
alex edited the test plan for this revision. (Show Details)

Discovered a bug, that new record adding window closed by an X button (not HTML one) leaves temporary tables behind.

alex updated this revision to Diff 1085.Aug 17 2022, 4:37 AM

Added support for tracking new record creation windows.

This revision is now accepted and ready to land.Aug 17 2022, 4:37 AM
alex requested review of this revision.Aug 17 2022, 4:40 AM
erik accepted this revision.Aug 17 2022, 7:17 AM
This revision is now accepted and ready to land.Aug 17 2022, 7:17 AM