Merged
Conversation
davedrp
approved these changes
Mar 1, 2024
Contributor
davedrp
left a comment
There was a problem hiding this comment.
Developer testing passed
nickpalladino
approved these changes
Mar 5, 2024
Member
nickpalladino
left a comment
There was a problem hiding this comment.
Don't remember why units wasn't used previously, maybe Breedbase didn't store them, but wouldn't really matter since stored in bi db.
Contributor
Author
I saw that in an older import template version there was a "Scale Name" column, that was dropped at some point and "Units" was added. 🤷 |
This was referenced Mar 27, 2024
6 tasks
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.
Description
Story: https://breedinginsight.atlassian.net/browse/BI-2053
What was wrong:
The
ScaleEntityclass was missing aunitsfield. The BrAPIScaleobject has aunitsfield, but our code was not previously using it. We were usingscaleNameto store units, but only numeric scale classes have units, andscaleNameis a required BrAPI field, so we were just filling it with the scale class when units were not present.What this PR does:
unitsfield of the BrAPIScaleand bi-api internalScaleEntityobjects.scaleNameis required, and it doesn't actually exist in our Ontology template, I made the executive decision to setscaleNametounitsif provided, otherwise it falls back to the scale class (a.k.a.dataType). This logic is in TraitFileParser.java.unitsfield toScaleEntityalso updates any existing numeric scales, settingunitsto thescale_name. I don't think this will do anything in production (we're wiping out brapi-server data), but it might help QA/rel-test go smoother.Dependencies
bi-api: bug/BI-2053 branch
bi-web: release/v0.9 branch
Testing
Checklist: