Skip to content

Conversation

@Budmin
Copy link
Contributor

@Budmin Budmin commented Jan 29, 2026

Resolves #5476

Description

I've updated the conditional logic in the call method of ItemizableUpdateService to detect changes in storage_location_id.

Previously, the service only published a new event if the quantities of items changed (inventory_changes?). Now, it also publishes an event if the storage location has changed, ensuring the Inventory Aggregate correctly moves items from the old location to the new one.

Type of change

  • Bug fix (non-breaking change which fixes an issue)

How Has This Been Tested?

I've added a new test case: "should send an event when the storage location changes".

  • Test Steps:
    1. Setup a Donation and publish its initial event.
    2. Call ItemizableUpdateService with parameters that change the storage_location_id but keep the item quantities exactly the same.
    3. Assertion: Verified that the event count increments (e.g., from 1 to 2), confirming that the service now recognizes the move and publishes the necessary event to update the inventory system.

Screenshots

Previously, changing locations (Bulk Storage in this example) would not trigger an update on the inventory page. Now that same action updates to show the correct location

Before:
image
Screenshot 2026-01-28 at 11 10 07 PM

After:
Screenshot 2026-01-28 at 11 09 07 PM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG]: Making a Correction to a Purchase Does Not Correctly Change Item Location

1 participant