Part-DB / Part-DB-server

Part-DB is an Open source inventory management system for your electronic components
https://docs.part-db.de/
GNU Affero General Public License v3.0
941 stars 108 forks source link

How to update the amount of components in a batch? #450

Open 0x915 opened 11 months ago

0x915 commented 11 months ago

I imported an existing list of components using [Import parts], and then I simulated a component inbound operation for new purchases: repeating the import of the same list multiple times. But what I get is that partdb creates entirely new components for each list, rather than adding quantities to existing exact matches.I tried deselecting [Create unknown datastructures] still have this problem.

Additional questions have arisen so far, how do I bulk delete these extra components? The only multi-select actions are Favorites and Reviews.

image

sgeerling commented 10 months ago

I have the same problem...

jbtronics commented 10 months ago

You can merge these parts together (via merge parts on the tools tab), then you will get the lots merged in one part.

However you have to do this by hand, as there is currently no good way, to determine if two parts are really the same.

0x915 commented 10 months ago

``I think you can use the manufacturer &&MPN (IPN only might work) to force the existing part to match, or add a field that matches on import and merge without reason, e.g. field "autoMerge", then when making the csv, add the column and fill in the globally unique string, and if you find an equivalent "autoMerge" on import, then merge the quantities. has an equivalent "autoMerge" then merge the quantities.

I prefer to add the field because the matching string is more flexible. Providing an interactive list of changes to the items when reimporting so that the operator can review and modify them avoids possible errors in the auto merge.

I'm getting HTTP 500 errors on my docker part-db after updating to version 1.10.

{"message":"Matched route \"redirector\".","context":{"route":"redirector","route_parameters":{"_route":"redirector","_controller":"App\\Controller\\RedirectController::addLocalePart","url":""},"request_uri":"http://192.168.0.233:200/","method":"GET"},"level":200,"level_name":"INFO","channel":"request","datetime":"2024-01-02T02:35:52.226681+00:00","extra":{"token":null,"url":"/","ip":"192.168.0.65","http_method":"GET","server":"192.168.0.233","referrer":null}}
{"message":"Uncaught PHP Exception OneLogin\\Saml2\\Error: \"Invalid array settings: sp_acs_url_invalid, sp_sls_url_invalid\" at Settings.php line 141","context":{"exception":{"class":"OneLogin\\Saml2\\Error","message":"Invalid array settings: sp_acs_url_invalid, sp_sls_url_invalid","code":2,"file":"/var/www/html/vendor/onelogin/php-saml/src/Saml2/Settings.php:141","trace":["/var/www/html/vendor/onelogin/php-saml/src/Saml2/Auth.php:178","/var/www/html/vendor/nbgrp/onelogin-saml-bundle/src/Onelogin/AuthFactory.php:27","/var/www/html/var/cache/docker/ContainerE8xMLiW/getAuthRegistryInterfaceService.php:23","/var/www/html/var/cache/docker/ContainerE8xMLiW/App_KernelDockerContainer.php:229","/var/www/html/var/cache/docker/ContainerE8xMLiW/getSecurity_Authenticator_Saml_MainService.php:39","/var/www/html/var/cache/docker/ContainerE8xMLiW/App_KernelDockerContainer.php:229","/var/www/html/var/cache/docker/ContainerE8xMLiW/getSecurity_Authenticator_Manager_MainService.php:31","/var/www/html/var/cache/docker/Containe
rE8xMLiW/App_KernelDockerContainer.php:229","/var/www/html/var/cache/docker/ContainerE8xMLiW/getSecurity_Firewall_Authenticator_MainService.php:21","/var/www/html/var/cache/docker/ContainerE8xMLiW/App_KernelDockerContainer.php:229","/var/www/html/var/cache/docker/ContainerE8xMLiW/getSecurity_Firewall_Map_Context_MainService.php:41","/var/www/html/vendor/symfony/security-bundle/Security/LazyFirewallContext.php:48","/var/www/html/vendor/symfony/security-http/Firewall.php:128","/var/www/html/vendor/symfony/security-http/Firewall.php:95","/var/www/html/vendor/symfony/event-dispatcher/EventDispatcher.php:260","/var/www/html/vendor/symfony/event-dispatcher/EventDispatcher.php:220","/var/www/html/vendor/symfony/event-dispatcher/EventDispatcher.php:56","/var/www/html/vendor/symfony/http-kernel/HttpKernel.php:157","/var/www/html/vendor/symfony/http-kernel/HttpKernel.php:76","/var/www/html/vendor/symfony/http-kernel/Kernel.php:197","/var/www/html/vendor/symfony/runtime/Runner/Symfony/HttpKernelRunner.php:35","/var/www
/html/vendor/autoload_runtime.php:29","/var/www/html/public/index.php:5"]}},"level":500,"level_name":"CRITICAL","channel":"request","datetime":"2024-01-02T02:35:52.230145+00:00","extra":{"token":null,"url":"/","ip":"192.168.0.65","http_method":"GET","server":"192.168.0.233","referrer":null}}
{"message":"User Deprecated: Since symfony/doctrine-bridge 6.3: Registering \"App\\EventSubscriber\\LogSystem\\EventLoggerSubscriber\" as a Doctrine subscriber is deprecated. Register it as a listener instead, using e.g. the #[AsDoctrineListener] attribute.","context":{"exception":{"class":"ErrorException","message":"User Deprecated: Since symfony/doctrine-bridge 6.3: Registering \"App\\EventSubscriber\\LogSystem\\EventLoggerSubscriber\" as a Doctrine subscriber is deprecated. Register it as a listener instead, using e.g. the #[AsDoctrineListener] attribute.","code":0,"file":"/var/www/html/vendor/symfony/doctrine-bridge/ContainerAwareEventManager.php:211","trace":["/var/www/html/vendor/symfony/doctrine-bridge/ContainerAwareEventManager.php:102","/var/www/html/vendor/doctrine/dbal/src/Connection.php:386","/var/www/html/vendor/doctrine/dbal/src/Connection.php:452","/var/www/html/vendor/doctrine/dbal/src/Connection.php:410","/var/www/html/vendor/doctrine/dbal/src/Connection.php:317","/var/www/html/vendor/doctri
ne/dbal/src/Connection.php:1315","/var/www/html/var/cache/docker/ContainerE8xMLiW/App_KernelDockerContainer.php:278","/var/www/html/var/cache/docker/ContainerE8xMLiW/App_KernelDockerContainer.php:348","/var/www/html/var/cache/docker/ContainerE8xMLiW/App_KernelDockerContainer.php:312","/var/www/html/vendor/symfony/var-exporter/Internal/LazyObjectState.php:100","/var/www/html/vendor/symfony/var-exporter/LazyGhostTrait.php:176","/var/www/html/vendor/doctrine/orm/lib/Doctrine/ORM/EntityManager.php:831","/var/www/html/src/Twig/UserExtension.php:68","/var/www/html/var/cache/docker/ContainerE8xMLiW/getTwigService.php:94","/var/www/html/var/cache/docker/ContainerE8xMLiW/App_KernelDockerContainer.php:229","/var/www/html/var/cache/docker/ContainerE8xMLiW/getErrorControllerService.php:23","/var/www/html/var/cache/docker/ContainerE8xMLiW/App_KernelDockerContainer.php:229","/var/www/html/vendor/symfony/dependency-injection/Container.php:229","/var/www/html/vendor/symfony/dependency-injection/Container.php:211","/var/www/
html/vendor/symfony/http-kernel/Controller/ContainerControllerResolver.php:40","/var/www/html/vendor/symfony/framework-bundle/Controller/ControllerResolver.php:26","/var/www/html/vendor/symfony/http-kernel/Controller/ControllerResolver.php:116","/var/www/html/vendor/symfony/http-kernel/Controller/ControllerResolver.php:96","/var/www/html/vendor/symfony/http-kernel/HttpKernel.php:164","/var/www/html/vendor/symfony/http-kernel/HttpKernel.php:76","/var/www/html/vendor/symfony/http-kernel/EventListener/ErrorListener.php:117","/var/www/html/vendor/symfony/event-dispatcher/EventDispatcher.php:260","/var/www/html/vendor/symfony/event-dispatcher/EventDispatcher.php:220","/var/www/html/vendor/symfony/event-dispatcher/EventDispatcher.php:56","/var/www/html/vendor/symfony/http-kernel/HttpKernel.php:239","/var/www/html/vendor/symfony/http-kernel/HttpKernel.php:91","/var/www/html/vendor/symfony/http-kernel/Kernel.php:197","/var/www/html/vendor/symfony/runtime/Runner/Symfony/HttpKernelRunner.php:35","/var/www/html/vendor/
autoload_runtime.php:29","/var/www/html/public/index.php:5"]}},"level":200,"level_name":"INFO","channel":"deprecation","datetime":"2024-01-02T02:35:52.235508+00:00","extra":{"token":null,"url":"/","ip":"192.168.0.65","http_method":"GET","server":"192.168.0.233","referrer":null}}
{"message":"User Deprecated: Since symfony/doctrine-bridge 6.3: Registering \"App\\EventSubscriber\\LogSystem\\LogDBMigrationSubscriber\" as a Doctrine subscriber is deprecated. Register it as a listener instead, using e.g. the #[AsDoctrineListener] attribute.","context":{"exception":{"class":"ErrorException","message":"User Deprecated: Since symfony/doctrine-bridge 6.3: Registering \"App\\EventSubscriber\\LogSystem\\LogDBMigrationSubscriber\" as a Doctrine subscriber is deprecated. Register it as a listener instead, using e.g. the #[AsDoctrineListener] attribute.","code":0,"file":"/var/www/html/vendor/symfony/doctrine-bridge/ContainerAwareEventManager.php:211","trace":["/var/www/html/vendor/symfony/doctrine-bridge/ContainerAwareEventManager.php:102","/var/www/html/vendor/doctrine/dbal/src/Connection.php:386","/var/www/html/vendor/doctrine/dbal/src/Connection.php:452","/var/www/html/vendor/doctrine/dbal/src/Connection.php:410","/var/www/html/vendor/doctrine/dbal/src/Connection.php:317","/var/www/html/vendor/
doctrine/dbal/src/Connection.php:1315","/var/www/html/var/cache/docker/ContainerE8xMLiW/App_KernelDockerContainer.php:278","/var/www/html/var/cache/docker/ContainerE8xMLiW/App_KernelDockerContainer.php:348","/var/www/html/var/cache/docker/ContainerE8xMLiW/App_KernelDockerContainer.php:312","/var/www/html/vendor/symfony/var-exporter/Internal/LazyObjectState.php:100","/var/www/html/vendor/symfony/var-exporter/LazyGhostTrait.php:176","/var/www/html/vendor/doctrine/orm/lib/Doctrine/ORM/EntityManager.php:831","/var/www/html/src/Twig/UserExtension.php:68","/var/www/html/var/cache/docker/ContainerE8xMLiW/getTwigService.php:94","/var/www/html/var/cache/docker/ContainerE8xMLiW/App_KernelDockerContainer.php:229","/var/www/html/var/cache/docker/ContainerE8xMLiW/getErrorControllerService.php:23","/var/www/html/var/cache/docker/ContainerE8xMLiW/App_KernelDockerContainer.php:229","/var/www/html/vendor/symfony/dependency-injection/Container.php:229","/var/www/html/vendor/symfony/dependency-injection/Container.php:211","/va
r/www/html/vendor/symfony/http-kernel/Controller/ContainerControllerResolver.php:40","/var/www/html/vendor/symfony/framework-bundle/Controller/ControllerResolver.php:26","/var/www/html/vendor/symfony/http-kernel/Controller/ControllerResolver.php:116","/var/www/html/vendor/symfony/http-kernel/Controller/ControllerResolver.php:96","/var/www/html/vendor/symfony/http-kernel/HttpKernel.php:164","/var/www/html/vendor/symfony/http-kernel/HttpKernel.php:76","/var/www/html/vendor/symfony/http-kernel/EventListener/ErrorListener.php:117","/var/www/html/vendor/symfony/event-dispatcher/EventDispatcher.php:260","/var/www/html/vendor/symfony/event-dispatcher/EventDispatcher.php:220","/var/www/html/vendor/symfony/event-dispatcher/EventDispatcher.php:56","/var/www/html/vendor/symfony/http-kernel/HttpKernel.php:239","/var/www/html/vendor/symfony/http-kernel/HttpKernel.php:91","/var/www/html/vendor/symfony/http-kernel/Kernel.php:197","/var/www/html/vendor/symfony/runtime/Runner/Symfony/HttpKernelRunner.php:35","/var/www/html/v
endor/autoload_runtime.php:29","/var/www/html/public/index.php:5"]}},"level":200,"level_name":"INFO","channel":"deprecation","datetime":"2024-01-02T02:35:52.235972+00:00","extra":{"token":null,"url":"/","ip":"192.168.0.65","http_method":"GET","server":"192.168.0.233","referrer":null}}
- -  02/Jan/2024:02:35:52 +0000 "GET /index.php" 500
192.168.0.65 - - [02/Jan/2024:02:35:52 +0000] "GET / HTTP/1.1" 500 4224 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36 Edg/120.0.0.0"