Problem/Motivation

TransactionSummary::tierLabel() falls back to the literal word "places" when a line has no price tier, so an untiered ticket names that word as its tariff and then repeats it in the quantity beside it. A free refuge ticket reads "Ticket 1 / places" with "1 place" next to it on screen, and "places - 1 place" in the rich-mail and plain-text summaries, so it reaches the booking notifications too (the declined-booking mail, for one).

An untiered line has no tariff to name. The fallback borrows the quantity's word to fill an empty slot, which reads like a category that does not exist.

Proposed resolution

Return NULL from tierLabel() when the line is untiered, and let every renderer leave the tariff out: the ticket render element skips the tariff span, the plain-text ticket line drops the empty part, and the mail template omits it. A free ticket then reads "Ticket 1" with "1 place" beside it; a tiered one keeps "Ticket 1 / Adult".

Remaining tasks

  • Fix tierLabel() and the three renderers.
  • Kernel coverage for an untiered line.
  • Update the summary docs.

User interface changes

An untiered ticket no longer shows "places" as its tariff, on screen and in mail.

API changes

The summary's ticket tier key is NULL for an untiered line instead of a translated "places" string.

Issue fork yoyaku-3613324

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 committed bf8d057f on 1.x
    fix: #3613324 An untiered line shows a "places" tariff label beside its...
mably’s picture

Status: Active » 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.