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

Apply GHG and GHGI unit versions to canonical columns #4462

Merged
merged 17 commits into from
Jan 20, 2024

Conversation

perryr16
Copy link
Contributor

@perryr16 perryr16 commented Jan 5, 2024

Any background context you want to provide?

GHG and GHGI units were selctable un column settings and mappings, however displayed values did not reflect these settings.

What's this PR do?

Applies unit conversion for canonical GHG and GHGI columns during the backend's retrieval from the db.

NOTE This does not work for extra data columns. This is a known issue and needs further discussion.

How should this be manually tested?

Upload a file with canonical columns "Total GHG Emissions" and "Total GHG Emissions Intensity" (or map to those canonical columns) then use the org settings to change the display units. The values on the inventory list and details should be updated.

What are the relevant tickets?

#2605

Screenshots (if appropriate)

settings
Screenshot 2024-01-05 at 1 29 39 PM

GHG - Mt/year & GHGI - Mt/ft2/year
Screenshot 2024-01-05 at 1 29 04 PM
GHG - kg/year & GHGI - Mt/m2/year
Screenshot 2024-01-05 at 1 48 38 PM

GHG - kg/year & GHGI - kg/ft2/year
Screenshot 2024-01-05 at 1 30 03 PM
GHG - kg/year & GHGI - kg/m2/year
Screenshot 2024-01-05 at 1 43 23 PM

@perryr16 perryr16 added the Bug label Jan 5, 2024
@perryr16 perryr16 changed the title 2605 ghg unit conversion Apply GHG and GHGI unit versions to canonical columns Jan 8, 2024
@perryr16 perryr16 marked this pull request as ready for review January 8, 2024 16:52
Copy link
Contributor

@haneslinger haneslinger left a comment

Choose a reason for hiding this comment

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

Looks good. How will this handle migrating data?

@kflemin kflemin merged commit 1003ef9 into develop Jan 20, 2024
8 checks passed
@kflemin kflemin deleted the 2605-ghg-unit-conversion branch January 20, 2024 02:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants