Skip to content

Release v1.6.62 - #255

Merged
roncodes merged 9 commits into
mainfrom
release/v1.6.62
Sep 16, 2026
Merged

roncodes merged 9 commits into
mainfrom
release/v1.6.62

Conversation

@roncodes

Copy link
Copy Markdown
Member

Release branch for v1.6.62, cut from main for the custom-field public id.

What it carries

Give custom fields a public id (#254) — every other resource in the platform is addressed by a prefixed public id; a custom field was addressed by its uuid, so any API handing one out exposed an internal identifier. FleetOps' inspection API was the case in point: a submission names the field each answer belongs to, and had nothing but a uuid to name it with.

  • CustomField takes HasPublicId with $publicIdType = 'custom_field', and public_id joins $fillable.
  • A migration adds the column and backfills existing rows. It is nullable()->index() rather than unique-and-required, following the groups precedent, so it is safe on an already-populated table.
  • HasCustomFields::setCustomField() creates a field with saveQuietly(), which skips the creating hook that mints the id, so that path mints its own — otherwise a field created on the fly would be the only one without one.

Scope

CustomField is platform-wide, so this gives every custom field a public id — orders, vendors, drivers, not only inspections. withCustomFields()'s public projection emits field names and is unchanged.

Downstream

FleetOps #319 emits the public id on a form's fields and on a submission's answers, falling back to the uuid until this lands — so nothing breaks in the interim, and the ids simply start appearing once it does. The collection (fleetbase/postman#62, #63) and the PHP SDK (fleetbase/fleetbase-php#17) already document the public-id form.

Checks

#254 was green before merge: build, Postman contract, and both codecov gates. vendor/bin/pest ran 1434 tests with 0 failures, php-cs-fixer clean, and a new generates custom field public ids test covers the minting.

Every other resource in the platform is addressed by a prefixed public
id; a custom field was addressed by its uuid, so any API handing one out
exposed an internal identifier. FleetOps' inspection API is the case in
point — a submission names the field each answer belongs to, and had
nothing but a uuid to name it with.

Existing rows are backfilled, and the column is nullable and indexed
rather than unique-and-required so the migration is safe on a table that
is already populated. A field created on the fly through
setCustomField() is saved quietly, which skips the hook that mints the
id, so that path mints its own.
The release branch carried the feature and nothing else: composer.json
still read 1.6.61 and RELEASE.md still described v1.6.61's IAM
authorization work. release.yml refuses the tag unless both agree with
the branch name, and its RELEASE.md check exists precisely to catch the
previous release's notes left in place — which is what these were.

composer.json is this repository's single source of the version, and
RELEASE.md now opens with the version it describes.
@codecov

codecov Bot commented Sep 14, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (4c763ce) to head (4119f9d).

Additional details and impacted files
@@             Coverage Diff             @@
##                main      #255   +/-   ##
===========================================
  Coverage     100.00%   100.00%           
- Complexity      6750      6765   +15     
===========================================
  Files            398       398           
  Lines          22502     22554   +52     
===========================================
+ Hits           22502     22554   +52     
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.

A triage queue needs to exclude snoozed alerts in the query and to say
who owns one. `snooze()` kept its wake time inside the `meta` JSON, so a
list of open-but-not-snoozed alerts had to load every row and ask each
one. Move it to an indexed `snoozed_until` column (reading the old meta
value for rows written before it existed), record who snoozed it, add
`assigned_to_uuid` for an owner distinct from the acknowledger, and
`planned_at` for a time the owner chose to handle it.

`acknowledge()` now also moves an open alert to `acknowledged`, which the
status column always documented but nothing wrote. New `snoozed()` and
`active()` scopes, plus `unsnooze()` and `assignTo()`.
The coverage gate wanted the three one-line members the alert tests
never reached: the snoozedBy and assignedTo relations and the
assigned_to_name accessor. Assert their foreign keys and the null
fallback alongside the existing relationship contracts.
An observer that refuses a write by throwing
FleetbaseRequestValidationException had its explanation discarded on two
paths. The write was still refused, but the caller saw "Invalid request"
or "Error occurred while trying to update a X" instead of the message
the observer wrote. Both sites already had a handler for the exception;
each was made unreachable by a catch block one frame deeper.

updateRecordFromRequest() wrapped every exception from $record->update()
in a plain \Exception, so the controller's dedicated catch and the global
handler's getErrors() rendering never saw the original. It now rethrows
FleetbaseRequestValidationException untouched and keeps wrapping
everything else, so database and internal errors still do not leak.

bulkDelete() listed catch (\Exception) before its QueryException and
FleetbaseRequestValidationException catches, leaving both dead behind a
@codeCoverageIgnore block that acknowledged as much. The catches are now
ordered most specific first and the ignore block is gone because the
branches are reachable and covered.

Create and single delete were already correct and are unchanged.

Fixes #256
…w-3717b2

Let observer refusals reach the caller on update and bulk delete
Give alerts a real snooze, an owner and a planned time
@roncodes
roncodes merged commit a67d303 into main Sep 16, 2026
10 checks passed
@roncodes
roncodes deleted the release/v1.6.62 branch September 16, 2026 11:02
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