Skip to content

Add CSV export for Project BOM tables#1442

Open
swdee wants to merge 5 commits into
Part-DB:masterfrom
swdee:export-bom
Open

Add CSV export for Project BOM tables#1442
swdee wants to merge 5 commits into
Part-DB:masterfrom
swdee:export-bom

Conversation

@swdee

@swdee swdee commented Jul 12, 2026

Copy link
Copy Markdown
Contributor

Summary

This PR adds the ability to export the BOM table of a project as a CSV file.

An Export as CSV button has been added to the Project BOM page.

partdb-export-as-csv-screen

The exported CSV contains the currently visible columns, preserves the current sort order and respects any active search/filter applied to the table.

Unlike the displayed table, pagination is intentionally ignored so the export always contains all matching BOM entries.

Motivation

My motivation for this feature is to have a BOM list sorted by storage locations that allows me to print and then pick components from storage efficiently.

This feature makes it easy to generate a printable BOM/picking list or further process the BOM in spreadsheet software.

partdb-export-as-csv-spreadsheet

Implementation

  • adds an Export as CSV button to the Project BOM page
  • exports the currently visible columns
  • preserves the current table sorting
  • preserves the current search/filter
  • exports all matching rows (ignoring pagination)
  • exports raw entity values instead of rendered HTML, avoiding formatting artefacts

Related

This also addresses previous requests for project BOM export:

@codecov

codecov Bot commented Jul 12, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 92.05607% with 17 lines in your changes missing coverage. Please review.
✅ Project coverage is 59.02%. Comparing base (a356b94) to head (8306b7e).

Files with missing lines Patch % Lines
...Services/ImportExportSystem/ProjectBomExporter.php 89.72% 15 Missing ⚠️
src/Controller/ProjectController.php 97.05% 2 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##             master    #1442      +/-   ##
============================================
+ Coverage     58.48%   59.02%   +0.54%     
- Complexity     8707     8763      +56     
============================================
  Files           639      640       +1     
  Lines         28146    28360     +214     
============================================
+ Hits          16461    16740     +279     
+ Misses        11685    11620      -65     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

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.

1 participant