Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix X hours in X weeks streak badges #890

Closed

Conversation

Renanluizssx
Copy link

Description

picturetwo

Related PRS (if any):

To test this backend PR you need to check the latest frontend

Main changes explained:

it was included a simple logic in checkXHoursXWeeks function

How to test:

  1. check into current branch
  2. do npm install and ... to run this PR locally
  3. Clear site data/cache
  4. you need to add to run awardNewBadges every time
  5. you need to take off awardNewBadges function inside condicional
  6. you need to enter in the mongodb compass
  7. you need to check userProfile folder
  8. you need to add the hours you would like to get the badge streak in savedTangibleHours array
  9. you need to monitor if in BadgeCollections appear only one badge streak

see the tutorials how to test below:

2024-04-10.17-31-59.mov
2024-04-10.17-36-47.mov
2024-04-10.17-39-23.mov

Screenshots or videos of changes:

Note:

Include the information the reviewers need to know.

  1. if the badge didn't appear in the badgeCollection, probably the badge don't exist
  2. if you have some difficults to test the back-end in nodemon, please watch this video: https://www.youtube.com/watch?v=GYR6GSAVC_k or this video https://www.dropbox.com/scl/fi/223fqqbzultw6chbl9a5p/Backend-testing-guide.mkv?rlkey=ygsr5w91lf76yxdha9n83favs&dl=0

Some questions please send me a dm in slack

navneeeth and others added 30 commits March 12, 2024 21:41
…_entry_blue_square

Roberto-fixes logic to push to the edit time entry history
…GNRest into navneeth_add_google_doc_link_to_weekly_summaries_email
…lySummaryReport: { type: Date, default: undefined }, this will now be updated each to match the date, when a recipient was added
…lySummaryReport: { type: Date, default: undefined }, this will now be updated each to match the date, when a recipient was added
…nto Sucheta-refactor-weeklySummaryRecipient-button
…lySummaryRecipient-button

Sucheta- Refactor WeeklySummaryRecipient Button Functionality
…nto shengwei_add_jae_account_edit_permission
…_Duplicate_Badges

Roberto fix assigning duplicate badges
…mentor_will_make_user_invisible

XiaoW_Hotfix of adding check for role in putUserProfile controller to make mentor invisible
…unt_edit_permission

Shengwei add Jae account edit permission
…ls_backend_linked

chris_equipment_details_backend_linked
Jingyii800 and others added 2 commits April 11, 2024 20:06
…ckbox_user_profile_backend

Jingyi-User Profile: Rehireable / Notrehireable Check Box
@Weiyao-Li Weiyao-Li requested review from Weiyao-Li and removed request for Weiyao-Li April 12, 2024 04:30
abdel-lall and others added 2 commits April 12, 2024 19:40
Aishwaryak01 and others added 2 commits April 13, 2024 11:57
…bles_request_form_backend

 Aishwarya-Purchase-Consumable-Request-Form-(Backend)
Copy link
Contributor

@skaush21 skaush21 left a comment

Choose a reason for hiding this comment

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

The version I tested this on may be outdated but I just thought I'd mention that Before merging, please ensure to adjust the files edited for testing purposes. For example, revert 'userProfilJobs.js' to:
'1 0 * * 0', // Every Sunday, 1 minute past midnight.

  • Extensively tested PR 890, added two sets of 30hrs to savedtangiblehrs, checked badgecollection did not receive a 30hr badge

(notes mentioned if badge doesnt appear in badgecollection, badge doesnt exist.)

  • added two sets of 40hrs via frontend ‘addtimeentry’
    this method increased the existing count by 1 for 40hrs streak for 1 week

  • did the following for 30 hrs as well, since badge doesnt exist, it didnt increase the count

PR.890.mov
most hours in week badge earned date updated x hrs for x weeks 40hrs in 1 week

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.