Skip to content

Dhruv - Fix blue square related issues - #2346

Open
DeMoliT1on wants to merge 3 commits into
developmentfrom
dhruv/fix-blue-square-email-issues
Open

Dhruv - Fix blue square related issues#2346
DeMoliT1on wants to merge 3 commits into
developmentfrom
dhruv/fix-blue-square-email-issues

Conversation

@DeMoliT1on

Copy link
Copy Markdown

Description

image

This PR fixes few of the Blue Square assignment issues:

  • New users starting Wednesday or later should not be given Blue Squares
  • Close enough hours email should also remove the blue square mentioned in the email
  • Add full name to "Administrative details" section

Related PRS (if any):

This is a backend only PR

Main changes explained:

  • Changed userHelper.js to update logic for new user, add full name to Administrative Details and remove blue square after close enough hours email trigger.
  • Updated testEmailJobs.js script to manually test cron job functions updated in this PR.

How to test:

  1. Check into current branch
  2. Log into Dev site with Owner account
  3. Choose a eligible volunteer user account on Dev site
  4. Make sure the account has MISSED_BY_<15% i.e no of hours logged in previous week is 85-99% of the weekly commitment.
  5. Open the user profile page /userprofile/<target_user_id>
  6. Assign a blue square manually on Sunday of current week.
  7. Alternatively you can also testEmailJobs.js script to call the assignBlueSquareForTimeNotMet function. Please make sure to change TARGET_USER_ID to the id from userporfile page ``/userprofile/<target_user_id> before calling the function.
  8. If you have used the script to assign the blue square make sure to change the assignment date to Sunday of current week.
  9. Now call the weeklyAutoReplyEmailFunction from the test script with the same user id.
  10. Refresh user profile on dev site and verify that the blue square has been removed.

Screenshots or videos of changes:

Blue.Square.Fix.Summary.Video.webm

Note:

Since the changes in the PR are related to cron job functions which runs weekly, the test script is the only way to test the changes. Additionally you won't be able to receive any infringement emails since those are only possible on Production.

- Stop Blue Squares for late joiners

- Close enough hours email should also remove the blue square

- Add full name to Administrative Details
@sonarqubecloud

Copy link
Copy Markdown

Quality Gate Failed Quality Gate failed

Failed conditions
8.3% Coverage on New Code (required ≥ 80%)

See analysis details on SonarQube Cloud

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