- Rollback transaction on failure before returning false
- Rollback transaction and return 0 on failure to save attribute link.
- Account for '0' being an acceptable TEXT or DECIMAL attributeValue.
- Add transaction to storeCSVAttributeValue function to prevent deleting the attribute links before confirming the new value successfully saved.
- Exclude the itemId in the check to see if the barcode number exists
- Add error checking to failed row insert
- Fail the import if an invalid stock location is found in the CSV
- Reworked &= to && logic so that it short-circuits the function call after if success is already false.
- Added logic to not ignore failed saveItemAttributes calls
Signed-off-by: objec <objecttothis@gmail.com>
- Correct mocking of dropdowns
- Correct expected value in test.
- Correct return value of function
- Remove whitespace
Signed-off-by: objec <objecttothis@gmail.com>
- Like other save_value() functions, the location_data variable is passed by reference.
- Unlike other save_value() functions, the location_data variable is not being updated with the primary key id.
- Corrected the logic in itemUpdate test
Signed-off-by: objec <objecttothis@gmail.com>
- Refactored for PSR naming
- Corrected errors in unit tests preventing them from passing. save_value() returns a bool, not the itemId
Signed-off-by: objec <objecttothis@gmail.com>
- Modified generate_message in Db_log.php to be defensive.
- Created a seeder to automatically prepare the test database.
- Modified the Unit Test setup to properly seed the test database.
- Wrote a unit test to test deleting an attribute from an item through the CSV.
Signed-off-by: objec <objecttothis@gmail.com>
- Add validateCSVStockLocations() method to check CSV columns against allowed locations
- Log error when invalid stock location columns are detected
- Tests for valid, invalid, and mixed stock location columns
- Tests for location name case sensitivity
- Tests for CSV parsing and detecting location columns
- Add error message language string for invalid locations
Co-authored-by: objecttothis <17935339+objecttothis@users.noreply.github.com>