- Add indexes to tables to improve query times.
- Delete orphaned attribute values.
- Resolve duplicate attribute values.
- Deleted whitespace after migration which was causing Severity: Warning --> Cannot modify header information - headers already sent by
- Created business logic in view to show dropdown if enabled
- Created business logic in controller to calculate key/value pairs of
dropdown
- Adjusted attribute model get_definition values to send values also if
definition_id is -1 or > 0 but not 0 which is what we are now using as
no definition instead of -1
- Added undelete function in Attribute model which could be useful for
adding the ability to restore attributes once deleted.
- Added business logic to Config controller save_general to
create/remove the attribute when the box is checked or unchecked.
This sorts alphabetically:
- Attributes on the Attribute->Item view
- Dropdowns for adding attributes in the Attribute->Item view
- Dropdowns for the attribute values themselves.
Prior to this fix, if the attribute was of DECIMAL or DATE type and the action was an UPDATE, then it would try to update the attribute_value, not the corresponding attribute_decimal or attribute_date.
Without this else if the change from text to dropdown fails but no actual query is made since the query to update the attribute type gets made by the save_definition function.
Without this else, TEXT->DROPDOWN fails. It just returns a simple success because no database changes are needed other than changing the definition_type which is not done here. This would also cause all other conversions not listed to automatically succeed, but we don't need to worry because those are restricted in the view to only ones that are actually supported.