Changes based on jbtronics' review of PR #1241:
- Rename kicad_export -> eda_visibility (entities, forms, templates,
translations, tests) with nullable bool for system default support
- Merge two database migrations into one (Version20260211000000)
- Rename createCachedJsonResponse -> createCacheableJsonResponse
- Change bool $apiV2 -> int $apiVersion with version validation
- EDA visibility field only shown for part parameters, not other entities
- PopulateKicadCommand: check alternative names of footprints/categories
- PopulateKicadCommand: support external JSON mapping file (--mapping-file)
- Ship default mappings JSON at contrib/kicad-populate/default_mappings.json
- Add system-wide defaultEdaVisibility setting in KiCadEDASettings
- Add KiCad HTTP Library v2 spec link in controller docs
The settings bundle stores values in the database. When upgrading from
a version without datasheetAsPdf, the stored JSON lacks this key,
causing a TypeError when assigning null to a non-nullable bool.
Making it nullable with a fallback in KiCadHelper fixes the upgrade path.
New setting "Datasheet field links to PDF" in KiCad EDA settings.
When enabled (default), the datasheet field resolves to the actual
PDF attachment URL. When disabled, it links to the Part-DB page
(old behavior). Configurable via settings UI or EDA_KICAD_DATASHEET_AS_PDF env var.
- Add KiCad API v2 endpoints (/kicad-api/v2) with volatile field support
for stock and storage location (shown but not saved to schematic)
- Add kicad_export flag to Orderdetail entity for per-supplier SPN control
(backward compatible: if no flag set, all SPNs exported as before)
- Add EDA completeness indicator column in parts datatable (bolt icon)
- Add ?minimal=true query param for faster category parts loading
- Improve category descriptions (use comment instead of URL when available)
- Improve BOM importer multi-footprint support: merge entries by Part-DB
part ID when linked, tracking footprint variants in comments
- Fix KiCost manf/manf# fields always present (not conditional on orderdetails)
- Fix duplicate getEdaInfo() call in shouldPartBeVisible
- Consolidate supplier SPN and KiCost field generation into single loop
Add a kicad_export checkbox to parameters, allowing users to control
which specifications appear as fields in the KiCad HTTP library API.
Parameters with kicad_export enabled are included using their formatted
value, without overwriting hardcoded fields like description or Stock.
- Use empty Response instead of JsonResponse(null) for 304 Not Modified
to avoid sending "null" as response body
- Guard parse_url() result with is_string() since it can return false
for malformed URLs
- Move storage location tracking inside the availability check so
expired and unknown-quantity lots don't contribute locations
- Add comprehensive KiCadHelperTest with 14 test cases covering:
- Stock quantity calculation (zero, single lot, multiple lots)
- Stock exclusion of expired and unknown-quantity lots
- Storage location display (present, absent, multiple)
- Datasheet URL resolution by type name, attachment name, PDF extension
- Datasheet fallback to Part-DB URL when no match
- "Data sheet" (with space) name variant matching
- Fix PDF extension detection for external attachments (getExtension()
returns null for external-only attachments, now also parses URL path)
- Add Stock field showing total available quantity across all part lots
- Add Storage Location field when parts have stored locations
- Resolve actual datasheet PDF from attachments (by type name, attachment
name, or first PDF) instead of always linking to Part-DB page
- Keep Part-DB page URL as separate "Part-DB URL" field
- Add ETag and Cache-Control headers to all KiCad API endpoints
- Support conditional requests (If-None-Match) returning 304
- Categories/part lists cached 5 min, part details cached 1 min
* Add supplier information to KiCad part exports
- Include supplier name and part numbers from order details in KiCad exports
- Handle multiple suppliers with sequential numbering (Supplier 2, Supplier 3, etc.)
- Include both active and obsolete order details for comprehensive supplier info
- Add null checks to prevent errors when supplier or part number is missing
* Add SPN suffix to field name
---------
Co-authored-by: Jan Böhmer <mail@jan-boehmer.de>