human-essentials icon indicating copy to clipboard operation
human-essentials copied to clipboard

Bug-5152-update-purchase-export-with-inactive-unpurchased-items

Open bsbonus opened this issue 7 months ago • 2 comments

Checklist:

X I have performed a self-review of my own code, X I have commented my code, particularly in hard-to-understand areas, X I have made corresponding changes to the documentation, X I have added tests that prove my fix is effective or that my feature works, X New and existing unit tests pass locally with my changes ("bundle exec rake"), X Title include "WIP" if work is in progress. X I acknowledge that I will not force push my branch once reviews have started.

Partial #5152 - partially, see main thread on this issue

Description

Updates the Purchases export to include inactive, unpurchased items in the export headers for consistency with the Distributions export

Type of change

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

How Has This Been Tested?

  1. Export the Distributions export as reference
  2. Ensure you have items that are inactive (with a unique name) and unpurchased
  3. Export the Purchases export and observe the number of columns for items don't match the Distribution export
  4. Export the Purchases export after the fix, observe the item columns now are consistent

See attached CSVs as reference Distributions_as_reference.csv

Purchases export before fix: purchases_before_fix.csv

Purchases after fix: purchases after_fix.csv

bsbonus avatar May 22 '25 19:05 bsbonus

Passes functional check. Over to @dorner for technical review.

cielf avatar May 23 '25 15:05 cielf

For this, it looks like we should switch to a CSV fixture based spec, and then it should be ready to merge.

awwaiid avatar Sep 13 '25 17:09 awwaiid