Follow-up to #3614361: Stepping a quantity up places one seat at a time, so a party is spread around the venue. The word free already carries both of its English meanings in this module, in two different submodules, so nothing reads wrong today only because they never meet in one file.

In yoyaku_placement it means unoccupied: PlaceAvailability::freeCandidates(), hasFreePlace(), freePools(), VenueAvailabilityBound::freeFor(). In yoyaku_payment it means zero-price: PaymentPolicyResolverTest::testCollectNoneIsFree() and testTariffZeroPriceIsFree(). A hall sells complimentary seats, press seats and invitations, so a comp feature would put a free seat and a free tariff in one file, and one of the two words would have to move then, with more built on top of it.

The occupancy axis is three-valued, and the other two words are unambiguous, so only the third one moves:

  • open: on sale as a place under this configuration, neither closed nor pooled. Kept, because PlaceBookable asks that question on its own through placeOpen().
  • taken: named by a booking in one of the CONSUMING_STATES.
  • free: open and not taken. This becomes available.

Why available rather than vacant. The read already excludes more than bookings: restrictToPlaceMarket() withholds a closed section, a pooled section and a pooled slice of a placed section, and a withheld seat is empty yet unsellable. Reserved seats would widen that set further: house seats, press holds, a companion seat beside a wheelchair space. So vacant would name a superset of what the method returns, which makes it wrong rather than merely plainer. Available says offerable to a buyer, which is what the method answers.

Availability is also the noun this module already spends on exactly this axis, 65 references: PlaceAvailability 33, AvailabilityFeed 13, show_availability_count 11, yoyaku.availability_bound 4, VenueAvailabilityBound 4. The class that owns the method is PlaceAvailability, so availableCandidates() needs no new vocabulary, where vacant would add a fourth word to a three-word axis. The existing availableActions(), availableInTenant() and availableOptions() are 11 occurrences on other subjects, workflow transitions, tenancy scoping and form options, where a generic adjective is normal. Free meaning price and occupancy on the same subject is not.

Scope, in three layers:

  • PHP identifiers, about 120 references over 49 files. The 27-over-9 figure first written here came from a hand-written list, and a regex sweep found far more: it had missed poolFree(), hasFreePlaces() in the root BookingManager (whose caller already read $query->minAvailable, so that one was inconsistent with its own neighbour), the free array keys, and seven test method names.
  • The venue map payload keys free and freeLabel built in VenueMapBuilder::pools(), their readers in js/venue-map.js, and the CSS class ysm-pool-free.
  • No cache shape bump: VenueMapBuilder caches geometry and bands only, while the counts are computed per request from the live taken counts, so its VERSION stays at 1.

This brings back a word that #3614361: Stepping a quantity up places one seat at a time, so a party is spread around the venue just removed with availablePlaces(). That removal was about loading a hall of entities to filter them in PHP, not about the name: availableCandidates() is the set-based read, returning PlaceCandidate objects.

Six user-facing strings move, not none as first written here: the two relocate messages in the picker, the pool shortfall message (whose @free placeholder becomes @available), the venue schedule empty text, the place_bookable plugin label, and @n free to @n available in the tariff occupancy cell. Four have French entries and those msgids move with them. The French itself needed no rewording: it already said libre, never gratuite, in every one of them, which is the clearest evidence that the ambiguity was in the English alone. No plugin id moves, because renaming a ConstraintPolicy id silently disarms stored attachments.

Two tests asserted on the renamed occupancy label, and one of them broke silently. A positive check on the printed figure fails loudly, but the same test also carried an absence assertion on the old wording, and that passes for free once the page no longer contains the word at all. A rename is exactly what turns an absence assertion vacuous. That negative is therefore deleted rather than renamed, since the positive already proves the figure, and the closed-place assertions become one positive assertion on the exact available set, which proves inclusion and both exclusions and cannot pass by returning nothing.

Fixed in passing, in a file the same commit already edits: the French catalog carried a stale msgid, @area: take one place at @rate, @free left, while the code says @left, so that string had been silently untranslated. Nothing else is user-visible: the label the map prints keeps its wording, only the key carrying it is renamed. None of the renamed identifiers appears in an interface, in yoyaku.api.php or in any module outside yoyaku, so there is no public API to keep compatible, and pre-1.0 there is no update hook and no BC shim to write.

Issue fork yoyaku-3614689

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

Issue summary: View changes

  • mably committed 96900999 on 1.x
    task: #3614689 Rename the occupancy axis from free to available, because...
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.