Skip to content

#5568 Fix kit allocation/deallocation history display direction (fixes #5568) - #5628

Merged
awwaiid merged 2 commits into
rubyforgood:mainfrom
rodrigovirgilio:fix/kit-allocation-history-display
Aug 29, 2026
Merged

#5568 Fix kit allocation/deallocation history display direction (fixes #5568)#5628
awwaiid merged 2 commits into
rubyforgood:mainfrom
rodrigovirgilio:fix/kit-allocation-history-display

Conversation

@rodrigovirgilio

Copy link
Copy Markdown
Contributor

Resolves #5568

Description

KitAllocateEvent/KitDeallocateEvent mix directions within a single event (components move one way, the kit item moves the other), and the kit's own line item is always last in the array. The history view derived From/To and quantity sign from the first item, which picked the component's direction instead of the kit's — showing kit counts negative and under the wrong location column. Now derives direction from the kit's line item for these two event types; underlying inventory math is untouched.

Type of change

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

How Has This Been Tested?

Screenshots

Comment thread app/views/events/_event_row.html.erb Outdated
@rodrigovirgilio
rodrigovirgilio force-pushed the fix/kit-allocation-history-display branch from 750e14a to 6fe19ca Compare July 13, 2026 09:19
@rodrigovirgilio
rodrigovirgilio requested a review from dorner July 13, 2026 09:24
Comment thread app/views/events/_event_row.html.erb Outdated
Comment thread spec/requests/events_requests_spec.rb Outdated
@rodrigovirgilio
rodrigovirgilio force-pushed the fix/kit-allocation-history-display branch from 8998808 to f697a71 Compare August 6, 2026 13:12
@rodrigovirgilio
rodrigovirgilio force-pushed the fix/kit-allocation-history-display branch from f697a71 to 88b1485 Compare August 6, 2026 13:28
@rodrigovirgilio
rodrigovirgilio requested a review from dorner August 6, 2026 13:34

@dorner dorner left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Passes tech review - over to manual QA @ruestitch @janeewheatley

@awwaiid awwaiid left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Works for me

@awwaiid
awwaiid merged commit d58875f into rubyforgood:main Aug 29, 2026
11 checks passed
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.

Rework history for kit allocations to be more intuitive

3 participants