feat: optional reference field on devices - #907
Conversation
Reimplements PR #775 on the Nuxt client. Groups that use their own repair-tracking software need to cross-reference an item on Restarters back to their own record, so the device gains a free-text reference: optional, 255 chars, shown small and muted above the item type in the event's device table. The API side follows #775 as-is (fillable, validation, resource, OpenAPI schema, both create and update paths). The client side is new: the field lives with brand/model in DeviceForm, since it identifies the item rather than describing its repair. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
EventDevicesReadOnly.vue duplicates DeviceRow.vue's columns for people who can't edit the event, so the reference belongs there as well - otherwise it disappears exactly for the audience most likely to be cross-checking it against their own records. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
An API 500 surfaces in the Playwright output only as "expected 200, received 500", and the job uploads nothing server-side, so there is no way to tell what actually threw without pushing a commit to find out. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
docker_run.sh runs migrate:fresh --seed as the container starts, so CI setting log_bin_trust_function_creators afterwards in "Setup application" is too late. The trigger migration fails with ERROR 1419, migrate stops there, and every later migration is silently skipped - leaving a half-migrated database that mostly works until something needs one of the skipped columns. That is why the device tests here returned 500: add_reference_to_devices comes after recreate_repair_status_triggers, so its column never existed. The same trap bites local reseeds. Setting it in the mounted my.cnf applies from server start, before anything migrates. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
|
|
Now green (build, build-client, e2e-client, Sonar). Two CI fixes ended up bundled in here, which is why a device-reference PR touches
The client e2e job kept no server-side logs. An API 500 showed up only as "expected 200, received 500", so there was no way to tell what threw without pushing a commit to find out. It now copies develop has the same |



Reimplements #775 on the Nuxt client, so the work isn't lost when the SPA lands.
Groups that run their own repair-tracking software need to tie an item on Restarters back to their own record. This adds an optional free-text
reference(max 255) to a device.API — as in #775: migration,
$fillable, validation invalidateDeviceParams, theDeviceresource, the OpenAPI schema, and both the create and update paths.Client — new work, since #775 predates the SPA:
DeviceForm.vue— the field sits with brand/model, because it identifies the item rather than describing its repair. Tooltip fromdevices.tooltip_reference.DeviceRow.vue— shown small and muted above the item type, matching what RES-2008 Add reference field for devices #775 did inEventDeviceSummary.vue, so it's readable without opening the row and without spending a table column.Translations —
reference/tooltip_referencein en, fr and fr-BE (fr strings taken from #775), withclient/i18n/locales/*.jsonregenerated bytranslations:export-client.Tests — written first: 5 client specs (field present with tooltip, sent when filled, omitted when blank, prefilled when editing, displayed in the row) and the #775 backend assertions for the create and update round trip. Client 88/88 pass; the two device feature tests pass with 23 assertions.
🤖 Generated with Claude Code