Repository navigation
Count every award in Analytics and keep its totals consistent - #3
Merged
Merged
Conversation
Analytics placed applications only by submitted date or sponsor deadline, so awards entered without either (typical for past grants added from the award side) dropped out of the counts and success rates. The Funding awarded chart summed every award in the database regardless of the funder and role filters, and the Total awarded tile used yet another basis, so the page could show $0 awarded beside a chart of millions. - Place applications by submitted date, then deadline, then decision, award notice or start date. A notice lists those placed by a fallback date, or not placed at all, so they can be fixed. - Funding awarded follows the funder and role filters; Total awarded is the sum of that chart. - The dashboard's 5-year success rate counts awards with no decision date by their notice or start date. - Creating an application as Awarded now creates its award record (budget years only, Closed if the project is over, no setup or reporting tasks) and opens the award form, which no longer pre-ticks a reporting schedule for a closed award. - Recording a status late uses a sponsor deadline that has passed as the submitted date instead of today. - Board: the Awarded and Not funded columns say which dates they cover, and the toggle reads "Show everything". Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01SAPwFhRyU83ey74tK1cYbJ
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes Analytics math that could show "1 awarded of 13 decided" and $0 Total awarded next to a Funding awarded chart showing millions.
Causes
Changes
No migrations, and no changes to existing records.
Testing
grants/tests/test_analytics.pyadds 12 tests. 10 of them fail on the old code; the other 2 are guards that pass on both.check --deployandmakemigrations --checkare clean.🤖 Generated with Claude Code
https://claude.ai/code/session_01SAPwFhRyU83ey74tK1cYbJ
Generated by Claude Code