Skip to content

Enhance search and ordering fields across remaining REST API endpoints - #12737

Open
bhumin18 wants to merge 11 commits into
inventree:masterfrom
bhumin18:enhance-remaining-api-search-fields
Open

Enhance search and ordering fields across remaining REST API endpoints#12737
bhumin18 wants to merge 11 commits into
inventree:masterfrom
bhumin18:enhance-remaining-api-search-fields

Conversation

@bhumin18

Copy link
Copy Markdown
Contributor

Summary

This PR improves search and ordering capabilities across remaining REST API endpoints:

  1. machine/api.py (MachineList - /api/machine/):

    • Add machine_type and driver to search_fields = ['name', 'machine_type', 'driver'].
  2. stock/api.py:

    • StockLocationTypeList (/api/stock/location-type/): Add description to search_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) to search_fields.
  3. importer/api.py:

    • DataImportSessionList (/api/importer/session/): Add missing search_fields = ['model_type', 'user__username', 'user__first_name', 'user__last_name'].
    • DataImportColumnMappingList (/api/importer/column-mapping/): Add missing search_fields = ['column_label', 'field_name'] and ordering_fields = ['column_label', 'field_name', 'session'].
  4. report/api.py (ReportAssetList - /api/report/asset/):

    • Add filter_backends = SEARCH_ORDER_FILTER, search_fields = ['description'], and ordering_fields = ['description'].

@netlify

netlify Bot commented Aug 29, 2026

Copy link
Copy Markdown

Deploy Preview for inventree-web-pui-preview canceled.

Name Link
🔨 Latest commit ddcdd4a
🔍 Latest deploy log https://app.netlify.com/projects/inventree-web-pui-preview/deploys/6a9aa2eb0e661300081db2ab

@codecov

codecov Bot commented Aug 29, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 87.12%. Comparing base (1520e0a) to head (ddcdd4a).

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     
Flag Coverage Δ
backend 91.15% <100.00%> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Components Coverage Δ
Backend Apps 92.31% <100.00%> (-0.11%) ⬇️
Backend General 93.95% <ø> (-0.74%) ⬇️
Frontend 79.87% <ø> (+0.08%) ⬆️
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

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