I am using a MacOS Homebrew as a dev environment with Apache, MariaDB, and PHP 8.3. The codebase is Providence dev/2.0 branch.
I am following the documentation here:
https://docs.collectiveaccess.org/providence/user/workflow/history_tracking_current_value
I have set record_movement_information_when_moving_storage_location = 1 and successfully tested a current_location history-tracking policy in ...conf/local/app.conf. When I move a storage location like a box or a cabinet from one room to another, it does not create movement record, and the move is not tracked in the logs of the objects. The box moves successfully, the objects in the box move correctly, the objects move inside to the new location as well, but nothing is updated beside the location:
- Time stamp on the object does not change from last manual update,
- The object log does not show the change in location.
- The storage container log updates with a geo-reference change, no other details.
- History tracking – chronology does work to move an object, and shows it in the log
- Move is not generated, is not findable in search
I did some testing and I think its is in ca_storage_locations::saveBundlesForScreen(), Where the movement tracking runs, $old_parent_id and $new_parent_id are equal on every move, so the guard that skips tracking when there is "no actual movement" fires every time and tracking is never reached.
See this line of code in app/models/ca_storage_locations.php
if ($old_parent_id === $new_parent_id) { return $rc; } // don't track if there's no actual movement
I added some logging and got this result on several move attempts
SBFS-DECIDE rc=true pc=true old=8 new=8
SBFS-DECIDE rc=true pc=true old=177 new=177
SBFS-DECIDE rc=true pc=true old=22 new=22
Steps to reproduce
- Configure current-location history tracking with a
ca_movements policy element
- Open a storage location with objects inside
- Using the
hierarchy_location bundle, go to the Move tab to select a different parent location.
- Movement form appears below
- Fill in the Movement details form and save.
I am using a MacOS Homebrew as a dev environment with Apache, MariaDB, and PHP 8.3. The codebase is Providence dev/2.0 branch.
I am following the documentation here:
https://docs.collectiveaccess.org/providence/user/workflow/history_tracking_current_value
I have set
record_movement_information_when_moving_storage_location = 1and successfully tested acurrent_locationhistory-tracking policy in...conf/local/app.conf. When I move a storage location like a box or a cabinet from one room to another, it does not create movement record, and the move is not tracked in the logs of the objects. The box moves successfully, the objects in the box move correctly, the objects move inside to the new location as well, but nothing is updated beside the location:I did some testing and I think its is in
ca_storage_locations::saveBundlesForScreen(), Where the movement tracking runs,$old_parent_idand$new_parent_idare equal on every move, so the guard that skips tracking when there is "no actual movement" fires every time and tracking is never reached.See this line of code in
app/models/ca_storage_locations.phpif ($old_parent_id === $new_parent_id) { return $rc; } // don't track if there's no actual movementI added some logging and got this result on several move attempts
Steps to reproduce
ca_movementspolicy elementhierarchy_locationbundle, go to the Move tab to select a different parent location.