- Document the eda_* import columns in docs/usage/import_export.md: the flat form and its short
aliases, and the nested eda_info.* form used by the CSV/JSON export and the shipped
part_import_example.csv.
- Add EntityImporterTest coverage locking in that BOTH the nested eda_info.* form and the flat
form import the EDA fields correctly (the nested form already worked via the serializer but was
untested, so an export -> re-import round-trip could silently regress).
- Fix the eda_invisible alias: it was a plain key-rename to eda_visibility, so eda_invisible=1
stored visibility=true (made the part visible - the opposite of the name). It is now handled
explicitly and inverted.
* feat: add supplier SPN lookup for BOM import
Add automatic part linking via supplier part numbers (SPNs) in the
BOM importer. When a Part-DB ID is not provided, the importer now
searches for existing parts by matching supplier SPNs from the CSV
with orderdetail records in the database.
This allows automatic part linking when KiCad schematic BOMs contain
supplier information like LCSC SPN, Mouser SPN, etc., improving the
import workflow for users who track parts by supplier part numbers.
* add tests for BOM import with supplier SPN handling
* Fix: Use correct field name for LCSC supplier part numbers in BOM import
The field mapping system uses 'LCSC SPN' as the target field name for LCSC
supplier part numbers (following the pattern SupplierName + ' SPN'), but the
code in parseKiCADSchematic() was incorrectly checking for 'LCSC'.
This caused LCSC supplier part numbers to be silently ignored and not included
in the BOM entry comments during schematic import.
Changed isset($mapped_entry['LCSC']) to isset($mapped_entry['LCSC SPN']) to
match the actual field name produced by the field mapping system.
* regression test: check for LCSC SPN in comment
* Support dynamic supplier SPNs in BOM import comments
Replace hardcoded LCSC SPN handling with dynamic supplier lookup to support all configured suppliers in BOM import. This allows any supplier defined in
Part-DB to have their SPN fields recognized and included in the BOM entry
comments during BOM import.
* Optimize BOM import by only calculating supplier SPN keys once