Unit conversion from SQ_M to SQ_FT fails
We have schema properties that use Area units. When the element is selected, the frontend tries to use a quantity formatter to format the stored SQ_M value in SQ_FT. This crashes inside UnitFormatter.processUnits due to:
if (!this.checkBaseUnitsMatch(fromBaseUnits, toBaseUnits))
throw new BentleyError(BentleyStatus.ERROR, `Source and target units do not have matching base units`, () => {
return { from, to };
});
@Rock2000, what's the version of itwinjs-core you're using?
@Rock2000 what kind of quantity are you using for these area properties? The persistence unit might be different between these two. The code snippet you share is coming from ecschema-metadata, so this must be the SchemaUnitsProvider logic. Is the schema in question something that can be found in the public bisschemas GH repo?
cc @ColinKerr @rschili
@Rock2000 is this still an issue?
Sorry, I don't get notifications from github (or they are lost in a sea). I think this is all set, although I don't know if we sidestepped it or if it was fixed. But I guess for now we can say it works.