|
Add support for derived UOM conversion factors
---------------------------------------------- Key: OFBIZ-3848 URL: https://issues.apache.org/jira/browse/OFBIZ-3848 Project: OFBiz Issue Type: Improvement Components: framework Reporter: Scott Gray Assignee: Scott Gray Priority: Minor Say we have 3 UOMs A, B and C, and we have UomConversion records for: A -> B B -> C currently the convertUom service in unable to directly convert from A -> C I propose we add support for automatically deriving conversion factors by walking the available conversion paths until an appropriate path is found. Comments are welcome, this is mainly just a TODO reminder for myself though. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online. |
|
[ https://issues.apache.org/jira/browse/OFBIZ-3848?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12885425#action_12885425 ] Adam Heath commented on OFBIZ-3848: ----------------------------------- brainstorming... When a direct conversion A-B is not found, the following pseudo code would function 1: Note a visit to A 2: Find all A->Foo 3: Note a visit to all Foo 4: Find all Foo->Bar, except for those nodes that have already been visited 5: If Bar == B, note cached result, break 6: swap Foo, Bar 7: goto 3 For each new registered conversion, clear the cache. This would work for UomConversions, and for the conversion framework. > Add support for derived UOM conversion factors > ---------------------------------------------- > > Key: OFBIZ-3848 > URL: https://issues.apache.org/jira/browse/OFBIZ-3848 > Project: OFBiz > Issue Type: Improvement > Components: framework > Reporter: Scott Gray > Assignee: Scott Gray > Priority: Minor > > Say we have 3 UOMs A, B and C, and we have UomConversion records for: > A -> B > B -> C > currently the convertUom service in unable to directly convert from A -> C > I propose we add support for automatically deriving conversion factors by walking the available conversion paths until an appropriate path is found. > Comments are welcome, this is mainly just a TODO reminder for myself though. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online. |
|
In reply to this post by Nicolas Malin (Jira)
[ https://issues.apache.org/jira/browse/OFBIZ-3848?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12885553#action_12885553 ] Adrian Crum commented on OFBIZ-3848: ------------------------------------ It would be nice if UOM could be modeled in Java classes - so it can also be used by a Quantity (amount + unit) class. > Add support for derived UOM conversion factors > ---------------------------------------------- > > Key: OFBIZ-3848 > URL: https://issues.apache.org/jira/browse/OFBIZ-3848 > Project: OFBiz > Issue Type: Improvement > Components: framework > Reporter: Scott Gray > Assignee: Scott Gray > Priority: Minor > > Say we have 3 UOMs A, B and C, and we have UomConversion records for: > A -> B > B -> C > currently the convertUom service in unable to directly convert from A -> C > I propose we add support for automatically deriving conversion factors by walking the available conversion paths until an appropriate path is found. > Comments are welcome, this is mainly just a TODO reminder for myself though. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online. |
| Free forum by Nabble | Edit this page |
