Skip to content

Fix inconsistent item headers in donation and purchase CSV exports#5539

Open
AHarris03 wants to merge 1 commit intorubyforgood:mainfrom
AHarris03:5152-fix-export-item-headers
Open

Fix inconsistent item headers in donation and purchase CSV exports#5539
AHarris03 wants to merge 1 commit intorubyforgood:mainfrom
AHarris03:5152-fix-export-item-headers

Conversation

@AHarris03
Copy link
Copy Markdown

Resolves #5152

Description

Previously, donation and purchase exports only included item columns present in the filtered dataset.

This change updates both export services to derive item headers from organization-level items, ensuring consistent CSV structure regardless of filters.

  • Updated ExportDonationsCSVService
  • Updated ExportPurchasesCSVService
  • Added regression tests for both

Manually verified:

  • Full and filtered exports now produce consistent headers

Type of change

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

How Has This Been Tested?

After logging in as a bank user, I exported both the full donations and purchases list, and then also exported with filters on both. Once I had the csv files, I combed through to make sure that all columns were accounted for and they were in their respective places.

Screenshots

Copy link
Copy Markdown
Collaborator

@dorner dorner left a comment

Choose a reason for hiding this comment

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

Actual changes look fine but there's an accidental commit that needs to be reverted.

Comment thread config/database.yml
database: diaper_dev
username: <%= ENV.fetch("PG_USERNAME", 'postgres') %>
password: <%= ENV.fetch("PG_PASSWORD", nil) %>
username: aleha
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.

This file shouldn't have been checked in.

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.

Exports should show all items - not just the ones that have data in the filtered list

2 participants