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
hoc: use DCDO value hoc_year in many places #15924
Conversation
@tanyaparker I've not yet embarked on testing these changes, and will probably need some help from you to cover everything. But I wanted to give you and @ashercodeorg an early look at the approach. |
FORM_INFOS << {kind: "'HocSignup#{year}'", dest_field: "hoc_organizer_years", dest_value: "'#{year}'"} | ||
end | ||
FORM_INFOS << {kind: "'Petition'", dest_field: "roles", dest_value: "'Petition Signer'"} | ||
FORM_INFOS.freeze |
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.
I maintained order here, though not sure whether that was necessary.
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.
I haven't tested it or checked if you got all the places, but this set of changes lgtm. I'm prioritizing trying to get out back to school specs first, so might not have a chance to take a closer look at this until late this 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.
Is a DCDO setting the most appropriate mechanism to specify the current HOC year? Not sure if there is better, I'm just wondering.
Otherwise, LGTM! Thanks for doing this!
Looks like we missed a file, namely |
@@ -76,11 +76,13 @@ def main | |||
day += 1 | |||
end | |||
|
|||
hoc_year = DCDO.get("hoc_year", 2017) |
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.
This should necessitate a require 'dynamic_config/dcdo'
?
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.
Thanks. Also found another similar case. @tanyaparker and I are scheduled to test all of this early next week to make sure it's working as expected, before merging.
I didn't test these and need your help testing locally.
I didn't test these but can test on staging.
I tested this.
|
Re: (1a), I'm working on a fix for this. @tanyaparker, my assumption is that you are seeing the same |
@ashercodeorg I actually got a nil error on line 137.
|
Ah, that is much, much simpler to fix. From
|
That fixed it thank you! |
Conflicts: pegasus/sites.v3/hourofcode.com/public/events/splat.haml
Regarding those three scenarios to test:
Merging now. |
Testing in staging... Unfortunately the Spanish/Portuguese emails don't work, you always get English. But this just keeps the existing behavior (it never worked). So I'll track to fix when we do more hoc work after back to school. |
Do we have an understanding why the i18n emails aren't sent? If we do, I imagine it wouldn't be too hard to fix. |
My guess is that we don't know |
Looks like you are right, I'm not seeing the |
Rather than having to manually update a whole bunch of places with the year of the upcoming Hour of Code, instead use DCDO value
hoc_year
to specify that year.This incorporates a bunch of suggestions given in #15735 to this end.
Note that it doesn't address the changes to www.hourofcode.com/events. From perusing those files, it seems there is an opportunity for a more significant code refactoring but I want to consider it separate to this change. Therefore this suggestion is not yet addressed.