Skip to content

Feature/batch info provider import #982

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 22 commits into
base: master
Choose a base branch
from

Conversation

barisgit
Copy link
Contributor

@barisgit barisgit commented Aug 2, 2025

  • Add ability to batch update parts from info providers

Works in the following way:

  1. User selects parts from any table and chooses action 'Bulk import from info provider'
image
  1. Gets redirected to step 1, where the user needs to choose how to search for parts (eg. user mpn to search on LCSC and MOUSER and at the same time use lcsc spn to search on LCSC)
image image
  1. Upon clicking "Search all parts", the server searches for all parts at once, presenting user with similar interface to single part import but for multiple parts, while at the same time creating a row in a new table 'bulk_info_provider_import_jobs' so that the progress is not lost upon refreshing. Optionally user can also check to prefetch details for every part in this stage (if the search returns too many parts, for example if we were to search by a vague keyword, this could mean it takes a long time, but can be prevented by choosing supplier part numbers instead). Prefetched data gets automatically stored in cache
image
  1. The job is then available to be opened from tools pane as well. On the job pane the user is presented with a list of all parts, where each part has search results. When user clicks update part they get redirected to info provider edit, with additional query parameter that tells page it is associated with a job. This way once saving part there is a button to go back, but at the same time mark part as completed in a job.
image image image

Note: I have by a mistake continued to work right on top of my other addition (excel support), so it would be best to first finish that or maybe even discard it and do everything here.

Copy link

codecov bot commented Aug 2, 2025

Codecov Report

❌ Patch coverage is 73.55649% with 316 lines in your changes missing coverage. Please review.
✅ Project coverage is 61.35%. Comparing base (8b417d6) to head (66f7629).

Files with missing lines Patch % Lines
...rc/Controller/BulkInfoProviderImportController.php 56.15% 171 Missing ⚠️
src/Controller/PartController.php 43.75% 27 Missing ⚠️
...Form/InfoProviderSystem/BulkProviderSearchType.php 0.00% 19 Missing ⚠️
...foProviderSystem/PartProviderConfigurationType.php 0.00% 19 Missing ⚠️
src/Services/EntityMergers/Mergers/PartMerger.php 5.00% 19 Missing ⚠️
src/Services/ImportExportSystem/EntityImporter.php 83.52% 14 Missing ⚠️
src/Entity/Parts/Part.php 7.69% 12 Missing ⚠️
...ices/InfoProviderSystem/Providers/LCSCProvider.php 83.33% 11 Missing ⚠️
src/Entity/BulkInfoProviderImportJob.php 94.90% 8 Missing ⚠️
src/Services/Parts/PartsTableActionHandler.php 11.11% 8 Missing ⚠️
... and 3 more
Additional details and impacted files
@@             Coverage Diff              @@
##             master     #982      +/-   ##
============================================
+ Coverage     59.83%   61.35%   +1.51%     
- Complexity     6050     6326     +276     
============================================
  Files           529      542      +13     
  Lines         20625    21730    +1105     
============================================
+ Hits          12341    13332     +991     
- Misses         8284     8398     +114     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@barisgit
Copy link
Contributor Author

barisgit commented Aug 2, 2025

Here is description of excel functionality pull report

  • Allow using xlsx and xls to import parts
  • Update example csv to better show what is possible
  • Add required tests (PASS)
  • Fix parts merger when using update from info supplier to consider parts that already have a spn populated a duplicate

…import jobs to junction table and implement filtering based on bulk import jobs status and its associated parts' statuses.
@barisgit
Copy link
Contributor Author

barisgit commented Aug 2, 2025

Added a tab for filtering by job statuses and such
image

@barisgit
Copy link
Contributor Author

barisgit commented Aug 4, 2025

Do not merge yet, there is a bug when user doesn't check prefetch and it still fetches info, causing timeout on larger sets.

@barisgit
Copy link
Contributor Author

barisgit commented Aug 4, 2025

Add priority support in mapping table
image
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant