Enhance search and ordering fields across remaining REST API endpoints - #12737
Open
bhumin18 wants to merge 11 commits into
Open
Enhance search and ordering fields across remaining REST API endpoints#12737bhumin18 wants to merge 11 commits into
bhumin18 wants to merge 11 commits into
Conversation
✅ Deploy Preview for inventree-web-pui-preview canceled.
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #12737 +/- ##
==========================================
- Coverage 87.13% 87.12% -0.02%
==========================================
Files 1483 1483
Lines 100504 100502 -2
Branches 11615 11605 -10
==========================================
- Hits 87579 87558 -21
- Misses 12863 12880 +17
- Partials 62 64 +2
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
…enhance-remaining-api-search-fields
…lds' into enhance-remaining-api-search-fields
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.
Summary
This PR improves search and ordering capabilities across remaining REST API endpoints:
machine/api.py(MachineList-/api/machine/):machine_typeanddrivertosearch_fields = ['name', 'machine_type', 'driver'].stock/api.py:StockLocationTypeList(/api/stock/location-type/): Adddescriptiontosearch_fields = ['name', 'description'].StockTrackingList(/api/stock/track/): Add tracking user (user__username,user__first_name,user__last_name),title, and stock item details (item__part__name,item__part__IPN,item__serial) tosearch_fields.importer/api.py:DataImportSessionList(/api/importer/session/): Add missingsearch_fields = ['model_type', 'user__username', 'user__first_name', 'user__last_name'].DataImportColumnMappingList(/api/importer/column-mapping/): Add missingsearch_fields = ['column_label', 'field_name']andordering_fields = ['column_label', 'field_name', 'session'].report/api.py(ReportAssetList-/api/report/asset/):filter_backends = SEARCH_ORDER_FILTER,search_fields = ['description'], andordering_fields = ['description'].