Skip to content

Fix car tag rank emblems to use racer rank when segment numbering is disabled#415

Open
jamestford wants to merge 1 commit intojeffpiazza:masterfrom
jamestford:fix-car-tag-rank-emblems
Open

Fix car tag rank emblems to use racer rank when segment numbering is disabled#415
jamestford wants to merge 1 commit intojeffpiazza:masterfrom
jamestford:fix-car-tag-rank-emblems

Conversation

@jamestford
Copy link
Contributor

When car numbering by segment (hundreds place) is not enabled, car tags now use the racer's actual rank (Lion, Tiger, Wolf, Bear, Webelos, AOL) to determine which emblem to display, rather than defaulting to the car number hundreds digit which would show all racers with car numbers 1-99 as Lions.

This fix checks the car-numbering setting and:

  • Uses rank name mapping when segment numbering is disabled
  • Falls back to car number method when segment numbering is enabled
  • Handles case-insensitive and plural rank names (Lions, Tigers, etc.)

Fixes issue where all racers showed Lion emblem despite being different ranks.

…disabled

When car numbering by segment (hundreds place) is not enabled, car tags now
use the racer's actual rank (Lion, Tiger, Wolf, Bear, Webelos, AOL) to
determine which emblem to display, rather than defaulting to the car number
hundreds digit which would show all racers with car numbers 1-99 as Lions.

This fix checks the car-numbering setting and:
- Uses rank name mapping when segment numbering is disabled
- Falls back to car number method when segment numbering is enabled
- Handles case-insensitive and plural rank names (Lions, Tigers, etc.)

Fixes issue where all racers showed Lion emblem despite being different ranks.
@jeffpiazza
Copy link
Owner

Thank you for investing the time to do this!

I infer that your pack races the whole pack as one group and wants to use car tags with images based on subgroup.

I think my preference would still be to base car tag image on the car number, and focus instead on numbering the cars with century values to reflect subgroup membership, as an alternative to basing them on groups.

It remains possible, if perhaps inconvenient, to number cars explicitly (e.g., by including car numbers in the imported roster), in which case the default numbering scheme wouldn't matter. Do you (or your pack) have any particular attachment to the current default numbering scheme?

When default numbering is used, presently the car number century is (optionally) based on group ordering; the idea would be to provide an alternative that uses the ordering of the subgroup.

Would this address your use case?

@jamestford
Copy link
Contributor Author

Happy to do so, I hope to contribute more as I have time, so happy you have invested so much time to put this together for everyone.

Our pack races each rank prior to having a grand finals race but the century based numbering creates an issue for us at registration. We use pre-printed number stickers (1-100) at check-in since we don't have a printer available at the registration venue. The car tags are printed after registration at home and used to help with staging the next day. This means we can't easily assign rank-specific number ranges at registration - we just grab the next available sticker from the pack.

The change proposed does not remove century based image mapping, here is the current logic as written:
If car-numbering setting = 100 → use century-based (car number / 100) [Current Behavior]
Else → try rank name mapping first, fallback to century if no match [New Behavior]

So packs that want to use century numbering still can. Packs that can't (like ours with pre-printed stickers) now have an alternative. Would you be open to reconsidering the subgroup-based approach given this constraint? We're happy to refine the implementation if you have concerns about the current PR.

@jeffpiazza
Copy link
Owner

Thank you, you make a strong case why century-based numbering isn't the right thing, at least not always.

Reflecting on this a little more, it occurs to me that, in the default setting, the century is effectively conveying the group's sortorder value (or the sortorder - 1 if starting from 1). Instead of string matching against group names, I'd be much happier having an option that applies the sortorder value directly.

(Matching against group names doesn't work very well for non-Cub Scout groups, or even for Cub Scout packs that identify their fifth-graders as "Webelos II", say. By contrast, users can manipulate sortorder for groups, and thereby have control of the numbering without having to adopt compromised group names.)

I think that would address your pack's process, if you'd like to revise the PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

Comments