Review main Merged

44617[BUGFIX] Update tstamp on writeForeignField if any foreign value has changed. (IRRE)

Sebastian Mazza CR +2 V +2 Easy +19 −0 updated 11/23/15, 15:02

Commit message

This patch solves the problem where the timestamp in the column tstamp
was not updated when the sorting of the inline list (IRRE) would change.
It also updates the tstamp if one of the following fields change:
foreign_field, foreign_table_field, symmetric_field or one of the
foreign_match_fields.

Review

  • Code review CR +2
    • Jigal van Hemert +2
    • Markus Sommer +1
    • Oliver Eglseder +1
  • Verified V +2
    • Jigal van Hemert +2
    • Markus Sommer +1
    • Oliver Eglseder +1

Issues 1

Files 1

Review log 17

  1. Sebastian Mazza uploaded patch set 1 11/08/15, 19:47

  2. Andreas Kienast commented on patch set 2 11/09/15, 16:58

    Published edit on patch set 1
  3. Andreas Kienast commented on patch set 3 11/09/15, 17:00

    Published edit on patch set 2
  4. Michael Oehlhof voted on patch set 3 CR +1 V +1 11/14/15, 13:17

  5. Oliver Eglseder commented on patch set 3 CR -1 11/14/15, 16:35

    RelationHandler.php:935

    Please check with !empty() or this would produce an E_NOTICE when the key is not set
  6. Sebastian Mazza uploaded patch set 4 11/15/15, 02:26

  7. Oliver Eglseder voted on patch set 4 CR +1 V +1 11/15/15, 11:11

  8. Jigal van Hemert voted on patch set 4 CR +1 V +1 11/15/15, 14:59

  9. Markus Sommer voted on patch set 4 CR +1 V +1 11/15/15, 18:58

  10. Frank Nägler commented on patch set 4 11/16/15, 15:05

    RelationHandler.php:939

    why update is needed in case we get no record?
  11. Sebastian Mazza commented on patch set 4 11/16/15, 15:47

    @Frank Nägler: I have written that to ensure that the tstamp is correct. Just to make sure. But this shouldn't take any effect because the exec_UPDATEquery() will fail anyway if the recod isn't in the DB.
  12. Frank Nägler commented on patch set 4 11/16/15, 16:58

    So, if this check is useless, then you can check: if (!empty($currentRow)) { for.... } no else needed and to "useless" update query. Code is then a little bit cleaner
  13. Daniel L commented on patch set 4 11/16/15, 18:57

    @Frank Nägler: Should we give -1 for Code-Review to clean up this condition?
  14. Sebastian Mazza commented on patch set 4 11/16/15, 19:39

    I can not imagine a case where the $currentRow is empty and the update doe’s not fail. But if such a case exists it would be better to update the tstamp even if it is not necessary then to change something on the record without updating the tstamp.
  15. Frank Nägler commented on patch set 4 11/20/15, 10:41

    Sorry for the late response, was a little bit busy the last days. So I don't understand why the update is needed, but I don't will block this patch. If Jigal is fine with the patch, he can merge it. This patch has enough votes, fine for me too.
  16. Jigal van Hemert voted on patch set 4 CR +2 V +2 11/23/15, 15:02

  17. Gerrit merged patch set 4 11/23/15, 15:02