A slot tariff names the tariff it provisions and carries a quota. Both shipped examples wrote those as category and capacity, names the entity does not declare, and create() drops an unknown key without complaining. So the rows were created and counted while both fields stayed empty.

yoyaku_placement_example leaves its two allocations with no tariff and no quota. validate() reports "This value should not be null." against tariff, which the field declares required, and an entity query for the seeded slot's allocations with exists('tariff') returns none. The two resource tariffs it ships are created correctly; nothing links them to the slot, so the concert prices nothing.

yoyaku_orchestra_example has the same two keys, found by sweeping for them rather than reported. Its 56 allocations named no tariff either, so the per-tariff caps it advertises were never enforced: a booking falls back to the slot's own capacity when no allocation matches, which is why every scenario in its end-to-end test kept passing.

Fix: seed tariff and quota in both, and rename the locals that fed them, since a local called $category feeding a field called tariff is what let the original rename miss these two sites. The state manifest keys are deliberately left as they are, because uninstall reads them to find what to delete and renaming them would strand the rows of an existing install.

Counting rows is what let this pass unnoticed, since both seeds produced the expected number of allocations either way, so neither test counts alone now. The placement seed's existing test asserts each allocation names its tariff, carries its quota and satisfies its own constraints. The workflow example is asked as counts in the end-to-end test's setUp(), which already reads the seed, rather than as another test method: that class shares one site install across its scenarios by design.

AI-Generated: Yes (Claude Code was used to help draft this issue summary and to write the fix and its tests on the merge request. I reviewed the work and installed both examples against a real site before posting.)

Issue fork yoyaku-3621578

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

mably created an issue. See original summary.

mably’s picture

Status: Active » Needs review
mably’s picture

Title: Yoyaku Placement Example seeds slot tariffs with removed field names, so its demo slot has no tariff allocation » Both example seeds write slot tariffs under removed field names, so their allocations name no tariff and carry no quota
Issue summary: View changes

  • mably committed 2d54c6a3 on 1.x
    fix: #3621578 Both example seeds write slot tariffs under removed field...
mably’s picture

Status: Needs review » Fixed

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.