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 off-by-one applicant free time & days available figures #532

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

thibaudcolas
Copy link

Based on the "Time commitment in application" discussion thread in chat, where Sage reported the off-by-one numbers are a known issue. This can be reproduce with the ready-made InternshipWeekScenario, with week 1.

For coordinators / mentors this appears in two places:

  • Looking at individual applicant info, "Applicant has 101% of their time free"
  • Looking at the table with all applicants, under "Number of days available", "89 / 88 days"

Screenshots for reference:

101-outreachy

89-88-outreachy


The calculation of the internship length seems to be inclusive of both the start and end date, without needing the + 1.

I chose to remove the increment because there are already two other places in the code where the same calculation is made without it:

internship_total_days = current_round.internends - current_round.internstarts

internship_total_days = current_round.internends - current_round.internstarts

That second occurrence in particular is what’s used for both calculations that were showing the off-by-one error.

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