Release v1.6.64 - #271
Merged
Merged
Release v1.6.64#271
Conversation
…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.
…or the date drift check
…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
…tials' into release/v1.6.64
Codecov Report✅ All modified and coverable lines are covered by tests. 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
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
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.
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?".
Column::expression()), including JSON reads, casts and decimals.softDeletes()on tables and relationships, andcount_distinct.public_id,internal_id) are selectable. Relationship columns get whole-name labels, and_key/_import_idare hidden.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
Downstream
method_existsfallbacks, so it also runs on 1.6.63, but items, JSON totals and soft deletes need this release.Checks
Both PRs passed the full suite (1,817 tests on #269, 1,797 on #270), with 100% coverage on
src/Support/ReportingandSettingController.composer.jsonis bumped to 1.6.64 andRELEASE.mdnames v1.6.64.🤖 Generated with Claude Code