Closed chmeeedalf closed 2 years ago
Thanks for the bug report. I've done a patch (https://github.com/Brewtarget/brewtarget/pull/627) which should address this. The issue, as you mention, is that BeerXML does not support these mash step types, so we have to write them out as something else. When I first did the mapping code, it was for reading BeerXML, so it didn't have to handle these steps (because they will never appear in a valid BeerXML file). The patch adds them in to the mapping so that the comment you found remains true!
Actually, let me look at this a little further. I realised a flaw in the fix I posted and have now found another bug.
https://github.com/Brewtarget/brewtarget/pull/629 includes a better fix (so that an XML comment shows the original info about whether something written as infusion is actually flySparge or batchSparge).
Please re-open if you still are experiencing this issue.
Thanks for fixing this! I just tested it and confirmed it's fixed.
There's a comment in src/xml/BeerXml.cpp stating that flySparge and batchSparge get treated as Infusion when writing out to XML. However, it instead crashes with:
ERROR : void XmlRecord::toXml(const NamedEntity&, QTextStream&, int, const char*) const Could not find string representation of enum property type value "4" when writing < "TYPE" > field of MashStep [xml/XmlRecord.cpp:798]
Given the bidirectionality of the records (import and export), I'm not sure how best to resolve this so that it does get treated as the comment states.