Skip to content

Bug fix: endedAt doesn't appear after 10 minutes - #970

Merged
tickBit merged 2 commits into
devfrom
954-bug-clanrole-endedAt-does-not-appear-after-10min
Sep 9, 2026
Merged

Bug fix: endedAt doesn't appear after 10 minutes#970
tickBit merged 2 commits into
devfrom
954-bug-clanrole-endedAt-does-not-appear-after-10min

Conversation

@EemeliJ

@EemeliJ EemeliJ commented Sep 9, 2026

Copy link
Copy Markdown
Collaborator

Brief description

Fix expired failed clan-role votings remaining unfinished.
Previously, set_clan_role votings returned early when they failed to reach the required majority, so finalizeVoting() was never called and endedAt remained unset. Now all expired role votings are finalized, while player roles are updated only when the vote passes.

Change list

  • Updated ClanRoleService.checkVotingOnExpire():
    Moved player role updates into the succesful-vote branch.
    Calls finalizeVoting() for both passed and failed votings.

  • Updated clan-role expiry tests:
    Verify finalization is called after both succesful and failed votes.

  • (extra) Swagger sign-in documentation
    Added and explicit request body schema for POST/auth/signIn (For testing through Swagger).

@codecov-alt

codecov-alt Bot commented Sep 9, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 80.00000% with 1 line in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
src/clan/role/clanRole.service.ts 80.00% 1 Missing ⚠️
Files with missing lines Coverage Δ
src/clan/role/clanRole.service.ts 67.08% <80.00%> (-0.21%) ⬇️

... and 1 file with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@EemeliJ EemeliJ self-assigned this Sep 9, 2026

@tickBit tickBit left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Excellent work 👍 ! Approved.

I tested locally with this code, that if the voting doesn't pass with majority, endedAt appears and if it does pass with majority, endedAt appears, too and the voting result comes into place. Everything works as excepted.

@github-project-automation github-project-automation Bot moved this from Backlog to Done in Altzone-Server Sep 9, 2026
@tickBit
tickBit merged commit 786576b into dev Sep 9, 2026
5 checks passed
@tickBit
tickBit deleted the 954-bug-clanrole-endedAt-does-not-appear-after-10min branch September 9, 2026 16:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants