Update to /api/barcode/po-recieve/ error messages#11369
Update to /api/barcode/po-recieve/ error messages#11369Idea-Junkie wants to merge 34 commits intoinventree:masterfrom
Conversation
Added DebugResponse Added Suppliers Tested Added Suppliers Errors
Changed "NotFound" to 'No_Match' different style for Debug response
✅ Deploy Preview for inventree-web-pui-preview ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
|
@matmair I will be making the documentation edits on here as well which is why its a PR draft. I believe this was a good first issue for me to get my feet wet, and I hope to be more of assistance on some other issues. any comments on how I went about this? Should I work on it and then make a PR draft request and include the conversation in there instead of how I did it with the discussion? or is the discussion a better method? |
matmair
left a comment
There was a problem hiding this comment.
Looks good in general; a few smaller things to address
I will allow CI now to see if there are style issues etc.
making generalized rules is hard; if it is a concrete change or widening to/of system behavior, a feature request with "I want to dev this" selected is the way to go. That allows us more concrete roadmap management and improves visibility to the change and that someone is working on it. Small things can just be done and PR'ed (with sufficient PR description). If the thing will take you longer than 1 week to dev I would certainly open an issue or discussion to ensure you do not waste time on duplicate / unwanted things. |
Added more variables updated formatting Added more in depth explanation block for Debug response
…-Junkie/InvenTree into More-Barcode-Error-messages
|
Updated the requests you made, let me know if there is anything else I need to add or change, as the workflow changed a little bit with the changes your requested. Also updated documentation (was only like two notes really) Also while Im at it, is there a way to make the images on the documentation smaller? Its always overblown for me on my desktop because its a vertical picture instead of horizontal, also tried to preview it in VScode but it just showed how the text would work. |
matmair
left a comment
There was a problem hiding this comment.
LGTM; adding some test coverage would be good too
adding matmirs comments Co-authored-by: Matthias Mair <code@mjmair.com>
|
@Idea-Junkie looking good in general -are you going to add support for these messages to the app, too? |
|
@Idea-Junkie yes, perfect! |
…-Junkie/InvenTree into More-Barcode-Error-messages
|
I believe this is ready for a commit now, Unless we think the tests would be necessary. |
|
Not really a fan of such changes without coverage, but I will defer to @SchrodingersGat for judgment if adding / extending them is required in this case |
Merging this PR will degrade performance by 6.89%
|
| Mode | Benchmark | BASE |
HEAD |
Efficiency | |
|---|---|---|---|---|---|
| ❌ | WallTime | test_api_list_performance[/api/stock/location/] |
19.6 ms | 21.1 ms | -6.89% |
Comparing Idea-Junkie:More-Barcode-Error-messages (5abadba) with master (246108e)1
Footnotes
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## master #11369 +/- ##
==========================================
- Coverage 87.99% 87.96% -0.03%
==========================================
Files 1295 1295
Lines 58793 58831 +38
Branches 1938 1938
==========================================
+ Hits 51733 51752 +19
- Misses 6578 6597 +19
Partials 482 482
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
|
I would definitely want to see some unit tests here. This barcode scanning to receive parts has gone through a number of bug-fix cycles already and it's very hard to trace down errors "in the field" because of the interplay between the different systems. So at the very least, some additional unit tests to cover the new modes of operation / expected error codes |
|
Ok, I will take a look at adding more unit tests. Thank you guys for your guidance and help with this! |
|
Would this apply to [ EDIT: Found in https://github.com/inventree/InvenTree/blob/master/src/backend/InvenTree/plugin/builtin/suppliers/test_supplier_barcodes.py |


Includes
Updates to barcode error messages, letting users know if a barcode was found with a plugin, and what is missing from that information.
Example: PO found, Supplier part Not found
See more in #11361
No Supplier Associated to Plugin
Also added "no_supplier_plugin _error" to notify the user if plugins do not have suppliers set in settings
This is set to only pop up if there is an error, if a match is found it skips this step
List of Tasks for this to be a Completed PR