Skip to content

Add CSV export for Project BOM tables - #1442

Merged
jbtronics merged 8 commits into
Part-DB:masterfrom
swdee:export-bom
Jul 27, 2026
Merged

Add CSV export for Project BOM tables#1442
jbtronics merged 8 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-spreadsheet2

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.16590% with 17 lines in your changes missing coverage. Please review.
✅ Project coverage is 59.15%. Comparing base (a356b94) to head (1747784).
⚠️ Report is 72 commits behind head on master.

Files with missing lines Patch % Lines
...Services/ImportExportSystem/ProjectBomExporter.php 89.93% 15 Missing ⚠️
src/Controller/ProjectController.php 97.05% 2 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##             master    #1442      +/-   ##
============================================
+ Coverage     58.48%   59.15%   +0.66%     
- Complexity     8707     8810     +103     
============================================
  Files           639      656      +17     
  Lines         28146    28554     +408     
============================================
+ Hits          16461    16890     +429     
+ Misses        11685    11664      -21     

☔ 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.

@jbtronics

Copy link
Copy Markdown
Member

Looks good. Thank you.

@jbtronics
jbtronics merged commit be03d1f into Part-DB:master Jul 27, 2026
14 checks passed
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.

2 participants