Skip to content
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 gas cost chart when there is a single meter #4150

Merged
merged 1 commit into from
Jan 9, 2025

Conversation

ldodds
Copy link
Collaborator

@ldodds ldodds commented Jan 9, 2025

Testing #4123 I noticed a long standing issue with the gas costs chart.

The issue only affects schools with a single gas meter and only on the 2 year comparison chart.

The cost pages use charts named with an electricity_ prefix. The default definition of that is to show the electricity costs. However the charts override that by specifying a meter (either a real gas/electricity meter or the aggregate one), which means the charts then shows the costs for that meter.

When a school has a single meter, the 2 year comparison chart was not specifying a meter, so it was defaulting to the electricity costs.

I've fixed this by updating the partials to build a chart_config for the aggregate (gas or electricity) meter so the right values are used.

The naming is a hold-over from previous versions of these pages and ideally needs tidying up. We should do that as a separate exercise, but there's a lot of other chart configurations to tidy as well.

@ldodds ldodds marked this pull request as ready for review January 9, 2025 11:13
@ldodds ldodds requested a review from tbhi January 9, 2025 11:13
@ldodds
Copy link
Collaborator Author

ldodds commented Jan 9, 2025

@tbhi do you mind reviewing this for today's release?

Copy link
Contributor

@tbhi tbhi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

surprised no erblint complaints

@ldodds ldodds merged commit 60a09d7 into master Jan 9, 2025
20 checks passed
@ldodds ldodds deleted the fix-single-gas-meter-cost-chart branch January 9, 2025 13:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants