Skip to content

Commit 6b5779d

Browse files
authored
fix(examples): ADR-0079 — app-todo task uses nameField, not retired titleFormat (#2465)
The app-todo example modeled the retired `titleFormat` pattern. With autoprov (provisionPrimary at registry) now designating a derived nameField, a render-only titleFormat is at best advisory and at worst shadowed. Migrate to the canonical `nameField: 'subject'` so the example demonstrates ADR-0079 best practice and the record-title gate stays clean. Drops the now-unused `tmpl` import. Co-authored-by: Jack Zhuang <277994282+os-zhuang@users.noreply.github.com>
1 parent b4a5df0 commit 6b5779d

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

examples/app-todo/src/objects/task.object.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { P, tmpl } from '@objectstack/spec';
1+
import { P } from '@objectstack/spec';
22
// Copyright (c) 2025 ObjectStack. Licensed under the Apache-2.0 license.
33

44
import { ObjectSchema, Field } from '@objectstack/spec/data';
@@ -180,7 +180,7 @@ export const Task = ObjectSchema.create({
180180
{ fields: ['category'] },
181181
],
182182

183-
titleFormat: tmpl`{{record.subject}}`,
183+
nameField: 'subject',
184184
compactLayout: ['subject', 'status', 'priority', 'due_date', 'owner'],
185185

186186
validations: [

0 commit comments

Comments
 (0)