Bug-5152-update-purchase-export-with-inactive-unpurchased-items
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?
- Export the Distributions export as reference
- Ensure you have items that are inactive (with a unique name) and unpurchased
- Export the Purchases export and observe the number of columns for items don't match the Distribution export
- 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
Passes functional check. Over to @dorner for technical review.
For this, it looks like we should switch to a CSV fixture based spec, and then it should be ready to merge.