Unexpected output: Affected paths: relative - resubmit patch.
⚙ D386 INP-1788 - Trigger a warning, when not all fields were updated via "kDBItem::Update" method call
Page MenuHomeIn-Portal Phabricator

INP-1788 - Trigger a warning, when not all fields were updated via "kDBItem::Update" method call
ClosedPublic

Authored by alex on Aug 10 2020, 9:20 AM.

Details

Test Plan

Preparations:

In IDE:

  1. open "core/kernel/db/db_event_handler.php" file for editing
  2. locate "\kDBEventHandler::_update" method
  3. change "if ( $object->Update($id) ) {" line into "if ( $object->Update($id, array('l1_Translation', 'LastChanged', 'LastChangeIP')) ) {"
  4. save changes

Test 1

In Admin Console:

  1. go to Website & ContentLabels & Phrases section
  2. open any record for editing
  3. change these fields: "Label", "Phrase" and "Column Phrase"
  4. save changes
  5. confirm, that only "Phrase" field value was saved into database
  6. confirm, that "These fields weren't updated for #4177 record in "phrases" unit: Phrase, PhraseKey" error message (the ID of record might be different) was added into the Logs & ReportsSystem Log section (the "l1_ColumnTranslation" field wasn't listed there due D383)

Test 2

In Admin Console:

  1. go to Website & ContentLabels & Phrases section
  2. open any record for editing
  3. change these fields: "Phrase"
  4. save changes
  5. confirm, that "Phrase" field value was saved into database
  6. confirm, that no new record was added into the Logs & ReportsSystem Log section

Diff Detail

Repository
rINP In-Portal
Branch
/in-portal/branches/5.2.x
Lint
Lint OK
Unit
No Unit Test Coverage
Build Status
Buildable 959
Build 959: arc lint + arc unit

Event Timeline

alex created this revision.Aug 10 2020, 9:20 AM
alex requested review of this revision.Aug 10 2020, 9:20 AM
alex added a project: Restricted Project.Aug 10 2020, 10:45 AM
erik accepted this revision.Aug 17 2020, 5:52 AM
This revision is now accepted and ready to land.Aug 17 2020, 5:52 AM
This revision was automatically updated to reflect the committed changes.