Week 076 — Item Saving Works Across All States

The refactor started in January. Item saving works correctly now.

Week of May 4, 2026

Progress

Item saving is working across all state transitions: safe updates, reporting lost, reporting found, reporting returned. New item creation is working again. QR code assignment is working again.

One significant bug along the way: ItemService->isFinderOwner() was returning null instead of a result. The root cause: the method was looking for the lost instance ID in the payload, but the item page's POST didn't include it. The fix was to inject the lost instance ID into the handler before calling isFinderOwner().

The points and stars allocation bug was also found and fixed. Both reportFound() and reportReturned() were calling the allocation method — meaning allocations were happening twice. The allocation was moved exclusively to reportReturned(), which is the moment when the finder has actually delivered the item and the reward should be earned.

Decision Made

Points and stars allocation only happens at reportReturned(). Finding the item starts the process; returning it completes it. The allocation belongs at completion.

Next Week

Desktop layout. Found page details — map, image, timestamps.