Skip to content

Fix update name template ordering - #276

Merged
ndamania00 merged 4 commits into
mainfrom
fix-update-name-template-ordering
Nov 7, 2026
Merged

ndamania00 merged 4 commits into
mainfrom
fix-update-name-template-ordering

Conversation

@ndamania00

@ndamania00 ndamania00 commented Nov 4, 2026 •

Copy link
Copy Markdown
Collaborator

Extends #272 by fixing UpdateNameTemplate ordering.

  • Updates operation ordering to put UpdateEntitySchemaNameTemplate between UpdateEntitySchemaField and ArchiveEntitySchemaField
  • Allow for order overriding through the CompareOperation
  • In compare...
    • If an existing entity schema is getting its naming strategies updated to include a template based naming strategy, create a new UpdateEntitySchema operation overridden to come after UpdateEntitySchemaNameTemplate that sets the naming strategies.
    • Fix bug where parent_link property should be getting set in UpdateEntitySchemaField
    • If a new entity schema is getting a template based naming strategy, create a new UpdateEntitySchema operation overridden to come after UpdateEntitySchemaNameTemplate that sets the naming strategies.
    • Tests

Cases this resolves

  • Removing a template-based naming strategy and clearing the template
Screenshot 2026-11-06 at 8 51 18 AM
  • Adding a template and enabling a template-based naming strategy
Screenshot 2026-11-06 at 11 29 50 AM
  • Added parent link field and adding link to name template for existing entity schema
Screenshot 2026-11-06 at 11 34 19 AM
  • Added parent link field and adding link to name template for new entity schema
Screenshot 2026-11-06 at 8 47 23 AM

mghent and others added 2 commits October 29, 2026 08:15
When a revision creates a schema whose name template uses a parent's lot
number, the template was set before the parent link existed, and the link
update left out parent_link. For newly created schemas:

- the follow-up link update sets parent_link with the target, and the
  create leaves it off
- the name template and template based naming strategies run after field
  updates, through an order override on CompareOperation
- the warehouse rename stays early and is its own step

Revisions for existing schemas keep the default order.

Closes #271.
@ndamania00 ndamania00 added type:minor-enhancement New minor feature or request semver:patch A backwards compatible bug fix (patch version bump) labels Nov 4, 2026
@ndamania00
ndamania00 merged commit c88a655 into main Nov 7, 2026
6 checks passed
@ndamania00
ndamania00 deleted the fix-update-name-template-ordering branch November 7, 2026 14:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

semver:patch A backwards compatible bug fix (patch version bump) type:minor-enhancement New minor feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

A new batch schema whose name uses its parent's lot number fails to create

2 participants