Skip to content

Conversation

@janeewheatley
Copy link
Collaborator

@janeewheatley janeewheatley commented Dec 4, 2025

Resolves #5446

Adds duplicate item detection and merging functionality to inventory audits. When users attempt to save or confirm an audit with duplicate items, a modal appears showing all duplicate entries and allows users to either merge the quantities or go back to make changes.

Type of change

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

How Has This Been Tested?

  • go to Inventory Audit
  • click New Audit button
  • create a new audit using barcodes, where items have multiple barcode entries associated to the same barcode (you can also create a new audit using the same item twice without barcodes)
  • click Save Progress and Confirm Audit to see the new modal
  • confirm that the merged quantity is correct
  • confirm that when you do not have duplicates, the modal does not show up

Screenshots

New modal should look as follows with barcodes included:
image

Without barcodes included:
image

@dorner
Copy link
Collaborator

dorner commented Dec 5, 2025

@janeewheatley is this ready for review? The description is still the default.

@janeewheatley
Copy link
Collaborator Author

@janeewheatley is this ready for review? The description is still the default.

NOT Ready!! Just trying some things out. Will change the title to say draft.

@janeewheatley janeewheatley changed the title 5446 Duplicate Item Entries Related to Multiple Barcodes 5446 Draft: Duplicate Item Entries Related to Multiple Barcodes Dec 5, 2025
@janeewheatley janeewheatley force-pushed the 5446-duplicate_item_entries_multiple_barcodes branch 2 times, most recently from f0fa8ee to 4ef7224 Compare December 10, 2025 05:19
@janeewheatley janeewheatley force-pushed the 5446-duplicate_item_entries_multiple_barcodes branch 3 times, most recently from aed2de6 to 9c7fb77 Compare December 11, 2025 05:28
@janeewheatley janeewheatley force-pushed the 5446-duplicate_item_entries_multiple_barcodes branch from 9c7fb77 to 1173f90 Compare December 11, 2025 05:35
@janeewheatley janeewheatley changed the title 5446 Draft: Duplicate Item Entries Related to Multiple Barcodes 5446 Duplicate Item Entries Related to Multiple Barcodes Dec 14, 2025
@janeewheatley janeewheatley force-pushed the 5446-duplicate_item_entries_multiple_barcodes branch from 86a024c to f417ae7 Compare December 14, 2025 04:17
Comment on lines 119 to 122
document.getElementById('duplicateItemsModal')?.remove()
document.querySelector('.modal-backdrop')?.remove()
document.body.classList.remove('modal-open')
document.body.style.removeProperty('overflow')
Copy link
Collaborator

Choose a reason for hiding this comment

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

See if the modal hide will work for this:

    const modal = new bootstrap.Modal(document.getElementById('duplicateItemsModal'))
    modal.hide()

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

great idea. fixed!

…of audit to isolate audit more robustly in spec
Copy link
Collaborator

@awwaiid awwaiid left a comment

Choose a reason for hiding this comment

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

Great!

@awwaiid awwaiid merged commit e17358d into rubyforgood:main Dec 16, 2025
11 checks passed
@github-actions
Copy link
Contributor

@janeewheatley: Your PR 5446 Duplicate Item Entries Related to Multiple Barcodes is part of today's Human Essentials production release: 2025.12.15.
Thank you very much for your contribution!

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]: Audit Scanner Creates Duplicate Item Entries When Multiple Barcodes Map to the Same Item

3 participants