-
Notifications
You must be signed in to change notification settings - Fork 16
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 renewal form endpoint #1585
Conversation
@@ -11,30 +12,46 @@ def handle(self, *args, **options): | |||
now = datetime.datetime.now() | |||
|
|||
year = now.year | |||
if now.month < 7: # Salesforce needs the school base year, this is how they calculate it | |||
if now.month > 7: # Salesforce needs the school base year, this is how they calculate it |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@dmoreno27 can you sanity check how i'm calculating this date and the query below?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it seems like it might have grabbed the wrong base year before... not sure how it ever worked
If it's after August, it should get the base year before the current year.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The base year cut off is June 30. So month would be >= 7.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If the current month is July - Dec, then current base year is the current year. if it is Jan - Jun, then the current base year is current year - 1.
@@ -259,7 +259,7 @@ | |||
('0 2 * * *', 'django.core.management.call_command', ['delete_resource_downloads']), | |||
('0 6 * * *', 'django.core.management.call_command', ['update_resource_downloads']), | |||
('0 0 8 * *', 'django.core.management.call_command', ['update_schools_and_mapbox']), | |||
('0 9 * * *', 'django.core.management.call_command', ['update_opportunities']), | |||
# ('0 0 1 * *', 'django.core.management.call_command', ['update_opportunities']), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
to mitigate risk, this is going to be run manually, not on a schedule
main priority here is to get adoption data for folks before a mass renewal email goes out
@TomWoodward this is ready for a look when you have time. Creative Services is planning to send a mass renewal email in the next two weeks and I was hoping to get this out before then (it'll make the user experience a lot better). Do you have any concerns with me merging, moving this to staging, getting some folks to help test, then moving to production next week? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sounds good, i also wanted to do a cms/web release for some fixes we have pending
Suspect IssuesThis pull request was deployed and Sentry observed the following issues:
Did you find this useful? React with a 👍 or 👎 |
This endpoint returns books used and student numbers to pre-populate the renewal form, creating a more frictionless experience for instructors to confirm usage.
This should fix the form auto-population, while also adding some fields that might be useful in the future.
No FE changes are required to support this. It used to work, then it stopped. Now it's back.
This will populate the renewal form with books and previous student count reported by an instructor who has an adoption that needs to be confirmed.