Open
Conversation
…association named manufacturingStatus
…to handle null values and translate the status using the translator service.
Bumps [actions/download-artifact](https://github.com/actions/download-artifact) from 4 to 7. - [Release notes](https://github.com/actions/download-artifact/releases) - [Commits](actions/download-artifact@v4...v7) --- updated-dependencies: - dependency-name: actions/download-artifact dependency-version: '7' dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact) from 4 to 6. - [Release notes](https://github.com/actions/upload-artifact/releases) - [Commits](actions/upload-artifact@v4...v6) --- updated-dependencies: - dependency-name: actions/upload-artifact dependency-version: '6' dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
…ning (Part-DB#1194) * added handling of LCSC barcode decoding and part loading on Label Scanner * when a part is scanned and not found, the scanner did not redraw so scanning subsequent parts was not possible without reloading the browser page. fixed the barcode scanner initialization and shutdown so it redraws properly after part not found * added redirection to part page on successful scan of lcsc, digikey, and mouser barcodes. added create part button if part does not exist in database * added augmented mode to label scanner to use vendor labels for part lookup to see part storage location quickly * shrink camera height on mobile so augmented information can been viewed onscreen * handle momentarily bad reads from qrcode library * removed augmented checkbox and combined functionality into info mode checkbox. changed barcode scanner to use XHR callback for barcode decoding to avoid problems with form submission and camera caused by page reloaded when part not found. * fix scanning of part-db barcodes to redirect to storage location or part lots. made scan result messages conditional for parts or other non-part barcodes * fix static analysis errors * added unit tests for meeting code coverage report * fix @MayNiklas reported bug: when manually submitting the form (from a barcode scan or manual input) redirect to Create New part screen for the decoded information instead of showing 'Format Unknown' popup error message * fix @d-buchmann bug: clear 'scan-augmented-result' field upon rescan of new barcode * fix @d-buchmann bug: after scanning in Info mode, if Info mode is turned off when scanning a part that did not exist, it now redirects user to create part page * fix @d-buchmann bug: make barcode decode table 100% width of page * fix bug with manual form submission where a part does not exist but decodes properly which causes the camera to not redraw on page reload due to unclean shutdown. this is an existing bug in the scanner interface. steps to produce the issue: - have camera active - put in code in Input - info mode ticked - click submit button on page reload the camera does not reactivate * fixed translation messages * Use symfony native functions to generate the routes for part creation * Use native request functions for request param parsing * Refactored LCSCBarcocdeScanResult to be an value object like the other Barcode results * Added test for LCSCBarcodeScanResult * Fixed exception when submitting form for info mode * Made BarcodeSourceType a backed enum, so that it can be used in Request::getEnum() * Moved database queries from BarcodeRedirector to PartRepository * Fixed modeEnum parsing * Fixed test errors * Refactored BarcodeRedirector logic to be more universal * Fixed BarcodeScanResultHandler test * Refactored BarcodeScanResultHandler to be able to resolve arbitary entities from scans * Moved barcode to info provider logic from Controller to BarcodeScanResultHandler service * Improved augmentented info styling and allow to use it with normal form submit too * Correctly handle nullable infoURL in ScanController * Replaced the custom controller for fragment replacements with symfony streams This does not require a complete new endpoint * Removed data-lookup-url attribute from scan read box * Removed unused translations * Added basic info block when an storage location was found for an barcode * Fixed phpstan issues * Fixed tests * Fixed part image for mobile view * Added more tests for BarcodeScanResultHandler service * Fixed tests --------- Co-authored-by: Jan Böhmer <mail@jan-boehmer.de>
…dering HTML attachments Fixed Part-DB#1150
This makes it consistent with the public paths and ensures all HTML is only rendered in our sandbox
That should not cause much security issues, as this is what users can do anyway via attachment creation, and markdown images
…ke them harder guess
…rom the barcode scan controller
…ntrol (Part-DB#1241) * Add stock quantity, datasheet URL, and HTTP caching to KiCad API - 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 KiCadHelper unit tests and fix PDF detection for external URLs - 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) * Fix 304 response body, parse_url safety, and location/stock consistency - 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 * Fix testPartDetailsPart2 to actually test Part 2 The test was requesting /parts/1.json instead of /parts/2.json and had Part 1's expected data. Now tests Part 2 which inherits EDA info from its category and footprint, verifying the inheritance behavior. * Use Symfony's built-in ETag handling for HTTP caching Replace manual If-None-Match comparison with Response::setEtag() and Response::isNotModified(), which properly handles ETag quoting, weak vs strong comparison, and 304 response cleanup. Fixes PHPStan return type error and CI test failures. * Add configurable KiCad field export for part parameters 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. * Add partdb:kicad:populate command for bulk KiCad path assignment Console command that populates KiCad footprint/symbol paths on Footprint and Category entities based on name-to-library mappings. Supports dry-run, force overwrite, and list modes. Includes 130+ footprint mappings and 30+ category symbol mappings for KiCad 9.x standard libraries. * Add CSV import support for EDA/KiCad fields Add user-friendly column aliases (kicad_symbol, kicad_footprint, kicad_reference, kicad_value, eda_exclude_bom, etc.) to the CSV import system. Users can now bulk-set KiCad symbols, footprints, and other EDA metadata via CSV/Excel import without knowing the internal dot notation. * Add batch EDA field editing from parts table Users can now select multiple parts in any parts table and batch-edit their EDA/KiCad fields (symbol, footprint, reference prefix, value, visibility, exclude from BOM/board/sim). Each field has an "Apply" checkbox so users control exactly which fields are changed. * Remove unused counter variable in BatchEdaController * Fix PHPStan errors in PopulateKicadCommand and BatchEdaController Add @var type annotations for Doctrine repository findAll() calls so PHPStan can resolve getEdaInfo() on Footprint/Category entities. Fix array return type for numeric-string keys and add explicit callback to array_filter to satisfy strict rules. * Fix batch EDA edit: required validation and pre-populate shared values - Add required=false to TriStateCheckboxType fields so HTML5 validation doesn't force users to check visibility/BOM/board checkboxes - Pre-populate form fields when all selected parts share the same EDA value, so users can see current state before editing * Add KiCad API v2, orderdetail export control, EDA status indicator, BOM improvements - 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 * Fix kicad_export column default for SQLite compatibility Add options default to ORM column definition so schema:update works correctly on SQLite test databases. * Make EDA status bolt icon clickable to open EDA settings tab * Fix EDA bolt link to correctly open EDA tab via data-turbo=false * Add configurable datasheet URL mode for KiCad API 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. * Fix settings crash when upgrading: make datasheetAsPdf nullable 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. * Add functional tests for KiCad API v2 and batch EDA controller - KiCadApiV2ControllerTest: root, categories, parts, volatile fields, v1 vs v2 comparison, cache headers, 304 conditional request, auth - BatchEdaControllerTest: page load, empty redirect, form submission * Fix test failures: correct ids format and anonymous access assertion * Improve test coverage for BatchEdaController Add tests for: applying all EDA fields at once, custom redirect URL, and verifying unchecked fields are skipped. * Address PR review: rename to eda_visibility, merge migrations, API versioning Changes based on jbtronics' review of PR Part-DB#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 * Fix duplicate loadMappingFile method causing PHP fatal error * Add tests for mapping file and alternative name matching, update populate command docs Add 5 new tests for PopulateKicadCommand covering: - Custom mapping file overriding defaults - Invalid JSON mapping file error handling - Missing mapping file error handling - Footprint alternative name matching - Category alternative name matching Update contrib README to document --mapping-file option, alternative name matching, and custom JSON mapping format. * Split out KiCad API v2 into separate PR as requested by maintainer Remove v2 controller, tests, and volatile field support from this PR. The v2 API will be submitted as a separate PR for focused discussion. * Improve test coverage for KiCadHelper and PopulateKicadCommand KiCadHelper: Add tests for orderdetail eda_visibility filtering, backward compatibility when no flags set, manufacturer/KiCost fields, and parameter with empty name skipping. PopulateKicadCommand: Add tests for mapping file with both footprints and categories sections, and mapping file with only categories. * Load populate Kicad default mappings from json file * Moved kicad:populate documentation to central docs * Added introduced column to PartTableColumns to make it configurable in the settings * Use TristateCheckboxes for parameter and orderdetail types * Fixed translation keys * Split up default eda visibility for parameters and purchase infos --------- Co-authored-by: Jan Böhmer <mail@jan-boehmer.de>
…B#1266) * feat(parts table): add eda reference prefix and value columns * Use better labels for column names and made it visible as default column selection --------- Co-authored-by: Jan Böhmer <mail@jan-boehmer.de>
This might helps with Part-DB#1176
* New translations messages.en.xlf (Italian) * New translations validators.en.xlf (Italian) * New translations messages.en.xlf (English) * New translations messages.en.xlf (English) * New translations messages.en.xlf (English) * New translations messages.en.xlf (English) * New translations messages.en.xlf (English) * New translations messages.en.xlf (German) * New translations messages.en.xlf (English)
…n an admin form issue Part-DB#1283
… really all cache pools, even app ones
…IPN info leakage issue Part-DB#1283
Bumps [actions/download-artifact](https://github.com/actions/download-artifact) from 7 to 8. - [Release notes](https://github.com/actions/download-artifact/releases) - [Commits](actions/download-artifact@v7...v8) --- updated-dependencies: - dependency-name: actions/download-artifact dependency-version: '8' dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact) from 6 to 7. - [Release notes](https://github.com/actions/upload-artifact/releases) - [Commits](actions/upload-artifact@v6...v7) --- updated-dependencies: - dependency-name: actions/upload-artifact dependency-version: '7' dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
… likely contains not the part number Fixes Part-DB#1285
…art-DB#1287) * Initial plan * Upload built assets as release attachments on version tag push Co-authored-by: jbtronics <5410681+jbtronics@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: jbtronics <5410681+jbtronics@users.noreply.github.com>
…tatable Correctly display Part's manufacturing status in BOMEntries Datatable
# Conflicts: # translations/messages.en.xlf
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #1289 +/- ##
============================================
- Coverage 55.41% 55.41% -0.01%
- Complexity 8268 8269 +1
============================================
Files 610 610
Lines 26519 26529 +10
============================================
+ Hits 14696 14701 +5
- Misses 11823 11828 +5 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Contributor
Author
|
@jbtronics Hi Jan, please merge this pull-request, if you consider it useful. I could finally fix it, see screenshot as proof. I don't understand, why Github shows that many commits but only the one file I changed. I closed the old PR because of this but now it's the same. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #1256
