-
Notifications
You must be signed in to change notification settings - Fork 588
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
Update default campaign automatically (#5082) #5633
base: master
Are you sure you want to change the base?
Update default campaign automatically (#5082) #5633
Conversation
Failing specs are not related to these changes. |
Code and tests look great! I'll give it a spin soon. |
@@ -33,7 +33,7 @@ | |||
context 'when WikiEd Feature disabled' do | |||
before { allow(Features).to receive(:wiki_ed?).and_return(false) } | |||
|
|||
it 'run default campaign update' do | |||
it 'do not run default campaign update' do |
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 just fixed this, since the description was incorrectly saying "run default campaign update", when what I wanted to specified was the opposite.
We don't actually want to switch these based on the current season, but rather based on the academic calendar where 'spring' is the semester that starts in January. I think the right dates for this feature are January 1 through June 30 for spring, and July 1 through December 31 for fall. |
oh that makes sense! I changed the dates on commit 927f807, and added some comments to clarify that dates are related to spring/fall semesters based on academic calendar. |
I closed this PR by mistake and I don't think I'm able to reopen it now. But it should be re-opened, as it's ready for review and merge. |
What this PR does
This PR schedules an automatic job that runs at the beginning of the spring and fall in northern hemisphere (please double-check these dates):
The job performs a default campaign update using
DefaultCampaignUpdate
class. First of all, it determines the current term (for example, 'spring_2024' or 'fall_2024'). If the current term already exists as a campaign (this is manually created each year according to the issue description), then the current term is set as the default campaign.Otherwise, default campaign is not updated.
Notice that the update is only done when
wiki_education
feature is set to true, as I understand the scope of the issue is for Wiki Education Dashboard.Closes #5082
Open questions and concerns