User tests: Successful: Unsuccessful:
The checked_out fields so far had the behaviour that items were checked out when the value was >0 and not checked out when it was equal to 0. From a theoretical standpoint, 0 here is a magic number and we should avoid that. So we should change that to using a real NULL value for checked-in items and a positive integer for checked-out items.
However, if this were just a theoretical exercise this wouldn't be a big issue. However we are now using NULL-aware table classes and we either need to add checks in each NULL-aware table class to fill the checked_out column with a 0 value or we need to make the change that this PR does. Otherwise a not-set checked_out column results in a failure when storing the table content. This can be seen in #29217.
This PR also unifies all checked_out columns to be an unsigned integer instead of INT(11), bigint, signed or whatever.
Status | New | ⇒ | Pending |
Category | ⇒ | Administration com_admin SQL Postgresql com_banners com_categories com_contact com_content com_fields com_finder com_installer com_languages com_menus |
Labels |
Added:
?
|
@Hackwar @richard67 RE: your comments technically the issues are the updateNulls
param in the \Joomla\CMS\Table\Table::store()
function. I think however we can safely rely on people using the dedicated checkIn
and checkOut
methods and document the change in the backwards compat docs
Status | Pending | ⇒ | Fixed in Code Base |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2020-05-29 20:40:43 |
Closed_By | ⇒ | wilsonge |
Thanks!
never mind a b/c break it doesnt work and breaks everything
@brianteeman can you elaborate. All of core seems to work fine to me. And #29272 will fix JM's issue I believe
Nice PR you know hat we use === null and not is_null normally?