Skip to content

release: Core API v1.6.72 — searchable columns registered at runtime - #317

Merged
roncodes merged 1 commit into
mainfrom
release/v1.6.72
Oct 19, 2026
Merged

roncodes merged 1 commit into
mainfrom
release/v1.6.72

Conversation

@roncodes

@roncodes roncodes commented Oct 19, 2026 •

Copy link
Copy Markdown
Member

Summary

  • open the v1.6.72 release branch
  • Searchable columns registered at runtime. Searchable::addSearchableColumns([...]) (static, per model class) merges extra columns into getSearchableColumns() and HasApiModelBehavior::searcheableFields(). Extensions can make their own data findable through a core or Fleet-Ops model's search without editing the model; relation.column dot notation works as before, and the relation may be one added with Eloquent's resolveRelationUsing().

Motivating use: an extension that stores companion records for orders (reference numbers, related contact names, custom field values) and wants them matched by the standard Fleet-Ops order search.

Test plan

  • Existing search unaffected when nothing is registered (getSearchableColumns() returns the model's own columns).
  • addSearchableColumns() de-duplicates, drops non-strings, and is per model class (unit test).
  • Order::addSearchableColumns(['companion.reference_number']) with a resolveRelationUsing relation → Order::search('abc') adds the whereHas clause.

@codecov

codecov Bot commented Oct 19, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (5e48813) to head (a8d8c9c).
⚠️ Report is 2 commits behind head on main.

Additional details and impacted files
@@             Coverage Diff             @@
##                main      #317   +/-   ##
===========================================
  Coverage     100.00%   100.00%           
- Complexity      8931      8935    +4     
===========================================
  Files            473       473           
  Lines          28057     28064    +7     
===========================================
+ Hits           28057     28064    +7     
Flag Coverage Δ
backend 100.00% <100.00%> (ø)

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

☔ View full report in Codecov by Harness.
📢 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.

Searchable::addSearchableColumns() registers extra columns per model class,
merged into getSearchableColumns() and searcheableFields(). Extensions can
make their own data findable through a core or Fleet-Ops model's search
(e.g. a companion record's reference number on orders) without editing the
model; dot-notation relation columns may name relations added with
resolveRelationUsing(). Covered by a unit test.
@roncodes
roncodes merged commit 931d48e into main Oct 19, 2026
5 checks passed
@roncodes
roncodes deleted the release/v1.6.72 branch October 19, 2026 06:21
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