Call for shows section shown inappropriately #160
Labels
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: rho_n/hpr_generator#160
Loading…
Reference in New Issue
No description provided.
Delete Branch "%!s(<nil>)"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
The section marked 'Call for shows' on the Home or Index page is displayed when there's no need.
There appears to be an error in the database query which turns this on and off.
The algorithm seems to be to look forward 10 days and count the number of shows in that time. If it is less than the minimum possible, then there's a gap within that period and the "Call for shows" message needs to be displayed.
The original algorithm is wrong; the alert message is displayed when there are 25 days to the next free slot!
It's not entirely obvious how many weekdays (Mon-Fri) there are in a random set of 10 days. A small Perl script was written to sample this and the results were:
The trigger value in the queries (MySQL and SQLite) needs to be reduced from 7 to 6. Anything below 6 means there is an imminent gap.
A pull request has been generated to correct this.
Pull request merged.
Closing the issue.