Skip to content

Release v1.6.64 - #271

Merged
roncodes merged 6 commits into
mainfrom
release/v1.6.64
Sep 25, 2026
Merged

roncodes merged 6 commits into
mainfrom
release/v1.6.64

Conversation

@roncodes

Copy link
Copy Markdown
Member

Release branch for v1.6.64, cut from main.

What it carries

Order reporting (#269). The report framework can answer questions like "Which products sold the most this month?" and "What did orders total this month?".

  • Expression columns (Column::expression()), including JSON reads, casts and decimals.
  • Summary columns that resolve to their aggregate, softDeletes() on tables and relationships, and count_distinct.
  • Computed group keys, conditions and sorts, and sorting grouped reports by an aggregate.
  • ID columns (public_id, internal_id) are selectable. Relationship columns get whole-name labels, and _key/_import_id are hidden.
  • Computed columns, sort directions and grouped-report computations are validated up front.

Test SMS with the entered credentials (#270, fixes fleetbase/fleetbase#680). Test SMS Provider and Test Twilio rebuild the Twilio client from the request's config under Octane, then release it after the send.

Behaviour changes

  • In a grouped report, a selected column that is neither a group key nor aggregated is now an error instead of being dropped.

Downstream

  • fleetbase/fleetops v0.6.70 carries the order report schema. It uses method_exists fallbacks, so it also runs on 1.6.63, but items, JSON totals and soft deletes need this release.
  • fleetbase/ember-ui v0.4.4 carries the report builder changes.

Checks

Both PRs passed the full suite (1,817 tests on #269, 1,797 on #270), with 100% coverage on src/Support/Reporting and SettingController.

composer.json is bumped to 1.6.64 and RELEASE.md names v1.6.64.

🤖 Generated with Claude Code

…port queries

Order reports could not answer basic questions such as "which products sold
the most this month" or "what did orders total this month". This extends the
reporting framework so extension schemas and the report builder can express them.

Schema
- Column::expression() declares a row-level SQL expression (e.g. a value read
  out of a JSON column). Bare names resolve against the table or relationship
  that declares it, so an expression on payload.entities reads the entity's meta.
  Expression columns can be selected, filtered, sorted, grouped and aggregated.
- Aggregate computed columns (Column::count/sum/...) are now flagged `aggregate`
  and resolve to their computation instead of a non-existent physical column.
  Without grouping they produce a summary row; with grouping they sit beside the
  group keys.
- Table/Relationship::softDeletes() leave out rows whose deleted_at is set (on
  the root table, and inside the ON clause of joins).
- public_id and internal_id are no longer hidden as foreign keys.

Queries
- Group by, filter and sort by computed columns; sort a grouped report by an
  aggregate's alias; new count_distinct aggregate.
- Computed expressions accept JSON_EXTRACT/JSON_UNQUOTE/JSON_VALUE and friends,
  DATE(), CAST(... AS DECIMAL(p,s)) and other cast targets, DISTINCT, IN, the
  ->/->> operators, and INTERVAL units, without misreading keywords as columns.
- Aggregate labels use the column label ("Sum (Quantity)").

Hardening
- Computed columns are validated in grouped reports too (a client-supplied
  aggregateBy computation was previously used unvalidated), their names must be
  safe identifiers, SELECT is forbidden, and schema-declared columns always take
  their SQL from the registry rather than the request.
- Group keys, aggregate columns, sort columns and condition fields must be
  allowed columns or computed columns; sort direction is normalised.
…p name, hide system columns

- A relationship column was labelled with only the first word of its
  relationship, so Order Config's namespace read "Order Namespace" and
  Customer Vendor's name read "Customer Name". Use the whole relationship
  label ("Order Config Namespace"), and don't repeat it when the column label
  already starts with it ("Transaction ID", not "Transaction Transaction ID").
- _key and _import_id are internal bookkeeping: never list or allow them,
  whatever a schema declares, on the root table or through a relationship.
"Test SMS Provider" failed with "Credentials are required to create a
Client" even with a Twilio SID and token filled in (fleetbase/fleetbase#680).

The test endpoints apply the entered credentials to config, but the Twilio
manager copies its settings when it is built and is cached twice: as a
container singleton and in the facade's static cache. Under Octane that
facade cache outlives the request, and the provider's singleton closure
reads the worker's base config rather than the request's copy. So a test
send used whatever the worker first built: empty credentials when none were
saved (the reported error), or the saved ones instead of those just entered.

- After applying the entered credentials, both test endpoints rebuild the
  manager from this request's config and clear the facade cache. A stand-in
  bound in place of the real manager is left alone.
- Once the test send is done the facade cache is cleared again, so the
  credentials under test are not reused by later requests in the worker.

Fixes fleetbase/fleetbase#680
@codecov

codecov Bot commented Sep 25, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (3e1e14a) to head (7c45a94).

Additional details and impacted files
@@             Coverage Diff              @@
##                main      #271    +/-   ##
============================================
  Coverage     100.00%   100.00%            
- Complexity      7410      7499    +89     
============================================
  Files            430       430            
  Lines          24357     24488   +131     
============================================
+ Hits           24357     24488   +131     
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.

@roncodes
roncodes merged commit 3965998 into main Sep 25, 2026
7 checks passed
@roncodes
roncodes deleted the release/v1.6.64 branch September 25, 2026 10:15
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.

Unable to send test SMS

1 participant