1003 feature request player data should hold the date when the player joined the clan - #1011
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests.
🚀 New features to boost your workflow:
|
…the-date-when-the-player-joined-the-clan
|
I updated the branch from UI. It looks like the test coverage is too low because 2 lines of code in |
Yes it's the lines I added in updateOnePostHook but I noticed it doesn't have a test suite at all, it's probably a unused method from the old PUT /player flow, it doesn't seem to be called anywhere in player.controller or the service itself. I could verify from AI and if it's unused I should probably revert the commit |
|
I'm not sure if it's a good idea to always add more and more code especially for parts that are not tested to begin with and are likely unused/old leftovers. The updateOnePostHook method doesn't have JSdoc either so I rather revert the commit that changes updateOnePostHook and go with that. |
…st in case)" This reverts commit ddbc777.
I asked AI about Here's summary:
|
|
Yea that's what I also understood and also Player clan join/leave should be fully handled by JoinService and ClanService that are covered in this PR so the PlayerService updateOnePostHook is probably not relevant for the clan_joindate..... |
tickBit
left a comment
There was a problem hiding this comment.
Good job 👍 ! Approved.
I'll do the required DB migration soon.
Brief description
Added new field clan_joindate in Player schema. The field stores the date when a Player has joined a Clan. If the Player isn't in a Clan the field is null. This field's value is handled automatically in Clan join/leave methods.
Tested in-memory utilizing MongoDB memory replica set:
Log:
Change list
clan_joindate?: Datein Player schema & exposed it in PlayerDTO20260927120000-add-player-clan-joindate.js. Existing Players in Clans get default date 01-09-2026 as required in the issue , those without a Clan get null.