Part-DB-server/tests
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
..
API Added custom part status (#1053) 2025-10-27 21:58:16 +01:00
assets Added custom part status (#1053) 2025-10-27 21:58:16 +01:00
Controller Fixed phpunit deprecations 2025-11-30 14:45:40 +01:00
DataTables/Filters Fixed tests 2025-09-21 21:35:13 +02:00
Doctrine Fixed tests for new PHPunit 11.5 2025-07-14 21:57:27 +02:00
Entity Added custom part status (#1053) 2025-10-27 21:58:16 +01:00
EnvVarProcessors Allow that the DEFAULT_URI does not end with a slash 2025-12-04 23:31:42 +01:00
EventListener Replace hardcoded entity type names with synonym placeholders in English and German translations (#1128) 2025-12-07 14:09:22 +01:00
EventSubscriber Only check every 10 minutes if the user needs to setup a 2FA method enforced by its group 2023-07-19 00:56:28 +02:00
Exceptions Run rector 2025-07-14 00:26:40 +02:00
Form/InfoProviderSystem Fixed phpunit deprecations 2025-11-30 14:45:40 +01:00
Helpers Fixed tests for new PHPunit 11.5 2025-07-14 21:57:27 +02:00
Repository Added feature for part IPN suggest with category prefixes (#1054) 2025-11-03 00:31:47 +01:00
Security Added declare strict types to all files 2023-06-11 18:59:07 +02:00
Serializer Migrated phpunit annotations to attributes 2025-07-14 00:32:06 +02:00
Services Support dynamic supplier SPNs in BOM import comments (#1208) 2026-01-25 21:32:14 +01:00
Settings Implemented the ability to set user-defined synonyms/labels for internal element types 2025-11-12 21:35:02 +01:00
Twig Added custom part status (#1053) 2025-10-27 21:58:16 +01:00
Validator Fixed PHPunit tests 2025-07-13 20:06:38 +02:00
.gitignore Initial commit 2019-02-23 16:49:38 +01:00
ApplicationAvailabilityFunctionalTest.php Fixed tests for new PHPunit 11.5 2025-07-14 21:57:27 +02:00
bootstrap.php Updated phpunit recipe 2025-07-13 16:53:41 +02:00
DatatablesAvailabilityTest.php Fixed tests for new PHPunit 11.5 2025-07-14 21:57:27 +02:00
object-manager.php Fixed PHPstan issues 2023-08-28 22:39:29 +02:00
SettingsTestHelper.php Run rector 2025-07-14 00:26:40 +02:00
symfony-container.php Added declare strict types to all files 2023-06-11 18:59:07 +02:00