Part-DB-server/tests/Services
Niklas 3aad70934b
Support dynamic supplier SPNs in BOM import comments (#1208)
* 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
2026-01-25 21:32:14 +01:00
..
Attachments Fixed tests for new PHPunit 11.5 2025-07-14 21:57:27 +02:00
EntityMergers/Mergers Added custom part status (#1053) 2025-10-27 21:58:16 +01:00
Formatters Applied rector to test files 2023-06-11 14:18:53 +02:00
ImportExportSystem Support dynamic supplier SPNs in BOM import comments (#1208) 2026-01-25 21:32:14 +01:00
InfoProviderSystem Added info provider for Buerklin (#1151) 2026-01-04 21:05:47 +01:00
LabelSystem Fix same error as in other branch and add makefile 2025-09-06 19:53:56 +02:00
LogSystem Run phpunit code quality rector 2025-07-14 00:38:54 +02:00
Misc Fixed tests for new PHPunit 11.5 2025-07-14 21:57:27 +02:00
Parameters Fixed tests for new PHPunit 11.5 2025-07-14 21:57:27 +02:00
Parts Remove problematic tests 2025-08-31 22:15:58 +02:00
ProjectSystem Use yellow alert box for notifying of empty bom on build, show infinite correclty and added translations 2025-10-18 23:32:20 +02:00
Trees Migrated phpunit annotations to attributes 2025-07-14 00:32:06 +02:00
UserSystem Fixed tests for new PHPunit 11.5 2025-07-14 21:57:27 +02:00
ElementTypeNameGeneratorTest.php Implemented the ability to set user-defined synonyms/labels for internal element types 2025-11-12 21:35:02 +01:00
ElementTypesTest.php Implemented the ability to set user-defined synonyms/labels for internal element types 2025-11-12 21:35:02 +01:00