Skip to content

fix(leadership): recognise a stúdióvezető who holds a second role - #53

Merged
KOliver94 merged 2 commits into
mainfrom
fix/head-of-studio-label
Oct 12, 2026
Merged

KOliver94 merged 2 commits into
mainfrom
fix/head-of-studio-label

Conversation

@KOliver94

Copy link
Copy Markdown
Member

Summary

The head of studio was found by an exact match on the free-text leadership label, so a label like Stúdióvezető, tanfolyamfelelős lost the highlight and the top spot on the Vezetőség page, and was synced to Drupal as an ordinary HQ role instead of setting the leader flag.

isHeadOfStudio in lib/members.ts is now the one rule, used by both the page and the Drupal sync. It accepts the title on its own or followed by a space or a comma. A hyphen does not count, because Stúdióvezető-helyettes is the deputy.

Drupal leader flag

Two existing bugs in updateDrupalUser sat behind the same exact match:

  • The flag was dropped on an unrelated edit. The sync writes a leader as the flag set with a blank HQ role, but the fallback for an edit that does not touch the role checked the role text for Stúdióvezető. The next status change therefore cleared the flag. It now keeps the flag Drupal reports, which was already parsed and never read.
  • The flag survived a role removal. Removing the role sends "", which matched the blank HQ role a leader already holds, so the BSS tab was never posted. Whether the role changed is now judged on both fields Drupal holds, the flag and the HQ role.

Side effect: giving an existing Drupal leader another stúdióvezető title (Stúdióvezető → Stúdióvezető, tanfolyamfelelős) no longer posts, since Drupal shows the two the same way. The second role does not appear on Drupal for a leader, as before. The new website receives the full label.

@codecov

codecov Bot commented Oct 12, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (c17f18a) to head (f92775b).
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@            Coverage Diff            @@
##              main       #53   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           89        89           
  Lines         1961      1960    -1     
  Branches       501       500    -1     
=========================================
- Hits          1961      1960    -1     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@KOliver94
KOliver94 merged commit bfbfb59 into main Oct 12, 2026
9 checks passed
@KOliver94
KOliver94 deleted the fix/head-of-studio-label branch October 12, 2026 22:17
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.

1 participant