For now item's effective location is changed by database trigger. Such implementation is not capable of triggering business logic (e.g. sending domain event).
- If temporary/permanent location of holding is changed all items, for which location is not specified should be updated according to https://wiki.folio.org/display/RA/Effective+Location+Logic (they should inherit effective location of holding)
- Domain events should be sent for all such items, as it is for usual update
- Legacy database triggers should be removed
On every holding update there should be check if effective location is changed. If it is changed there should sql query to find all items with unspecified location and effective location for such items should be updated.
The following cases should be checked after the implemtation:
- Changing item’s permanent/temporary location to remote location
- Moving an item to the holding with permanent/temporary remote location
- Creating an item in the holding with permanent/temporary remote location
- Starting actions on holding:
- Changing holding’s permanent/temporary location to remote location