Using number value with calcop operator does not work as thought
---------------------------------------------------------------- Key: OFBIZ-3821 URL: https://issues.apache.org/jira/browse/OFBIZ-3821 Project: OFBiz Issue Type: Bug Components: framework Reporter: Jacques Le Roux Fix For: Release Branch 10.04, SVN trunk For instance if you use {code} <calcop operator="multiply" field="parameters.numberSpecified"> <number value="${uomConversion.conversionFactor}"/> {code} and have a value > 1000 in conversionFactor you will get 1,000 for number value. It works well if you replace by {code} <calcop operator="multiply"> <calcop operator="get" field="parameters.numberSpecified"/> <calcop operator="get" field="uomConversion.conversionFactor"/> {code} The problem exists in trunk and certainly R10.04 (not tested) maybe in previous release though I don't think so, it looks like something introduced with UEL -- 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-3821?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12879320#action_12879320 ] Shubham Dubey commented on OFBIZ-3821: -------------------------------------- Hi Jacques I observed that the tag <number value="${uomConversion.conversionFactor}"/> can't parse the String value as it equates or exceeds value 1000 due to the extraneous character added. Thanks & Regards Shubham Dubey > Using number value with calcop operator does not work as thought > ---------------------------------------------------------------- > > Key: OFBIZ-3821 > URL: https://issues.apache.org/jira/browse/OFBIZ-3821 > Project: OFBiz > Issue Type: Bug > Components: framework > Reporter: Jacques Le Roux > Fix For: Release Branch 10.04, SVN trunk > > > For instance if you use > {code} > <calcop operator="multiply" field="parameters.numberSpecified"> > <number value="${uomConversion.conversionFactor}"/> > {code} > and have a value > 1000 in conversionFactor you will get 1,000 for number value. It works well if you replace by > {code} > <calcop operator="multiply"> > <calcop operator="get" field="parameters.numberSpecified"/> > <calcop operator="get" field="uomConversion.conversionFactor"/> > {code} > The problem exists in trunk and certainly R10.04 (not tested) maybe in previous release though I don't think so, it looks like something introduced with UEL -- 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-3821?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Shubham Dubey updated OFBIZ-3821: --------------------------------- Attachment: Patch_OFBIZ-3821.patch Here is the patch that resolves the issue. Thanks& Regards: Shubham Dubey Enterprise Software Developer Hotwax Media Pvt. Ltd. www.hotwaxmedia.com > Using number value with calcop operator does not work as thought > ---------------------------------------------------------------- > > Key: OFBIZ-3821 > URL: https://issues.apache.org/jira/browse/OFBIZ-3821 > Project: OFBiz > Issue Type: Bug > Components: framework > Reporter: Jacques Le Roux > Fix For: Release Branch 10.04, SVN trunk > > Attachments: Patch_OFBIZ-3821.patch > > > For instance if you use > {code} > <calcop operator="multiply" field="parameters.numberSpecified"> > <number value="${uomConversion.conversionFactor}"/> > {code} > and have a value > 1000 in conversionFactor you will get 1,000 for number value. It works well if you replace by > {code} > <calcop operator="multiply"> > <calcop operator="get" field="parameters.numberSpecified"/> > <calcop operator="get" field="uomConversion.conversionFactor"/> > {code} > The problem exists in trunk and certainly R10.04 (not tested) maybe in previous release though I don't think so, it looks like something introduced with UEL -- 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-3821?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12879357#action_12879357 ] David E. Jones commented on OFBIZ-3821: --------------------------------------- The attached patch is not an adequate fix for this problem. The fix should be to do number parsing in a locale sensitive way. If you get rid of all commas and it is in a locale where a comma is used for the decimal point, then the parsed value will be 10^{number of decimal digits} greater than it should be. > Using number value with calcop operator does not work as thought > ---------------------------------------------------------------- > > Key: OFBIZ-3821 > URL: https://issues.apache.org/jira/browse/OFBIZ-3821 > Project: OFBiz > Issue Type: Bug > Components: framework > Reporter: Jacques Le Roux > Fix For: Release Branch 10.04, SVN trunk > > Attachments: Patch_OFBIZ-3821.patch > > > For instance if you use > {code} > <calcop operator="multiply" field="parameters.numberSpecified"> > <number value="${uomConversion.conversionFactor}"/> > {code} > and have a value > 1000 in conversionFactor you will get 1,000 for number value. It works well if you replace by > {code} > <calcop operator="multiply"> > <calcop operator="get" field="parameters.numberSpecified"/> > <calcop operator="get" field="uomConversion.conversionFactor"/> > {code} > The problem exists in trunk and certainly R10.04 (not tested) maybe in previous release though I don't think so, it looks like something introduced with UEL -- 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-3821?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12879360#action_12879360 ] Jacques Le Roux commented on OFBIZ-3821: ---------------------------------------- Yes, thanks David! > Using number value with calcop operator does not work as thought > ---------------------------------------------------------------- > > Key: OFBIZ-3821 > URL: https://issues.apache.org/jira/browse/OFBIZ-3821 > Project: OFBiz > Issue Type: Bug > Components: framework > Reporter: Jacques Le Roux > Fix For: Release Branch 10.04, SVN trunk > > Attachments: Patch_OFBIZ-3821.patch > > > For instance if you use > {code} > <calcop operator="multiply" field="parameters.numberSpecified"> > <number value="${uomConversion.conversionFactor}"/> > {code} > and have a value > 1000 in conversionFactor you will get 1,000 for number value. It works well if you replace by > {code} > <calcop operator="multiply"> > <calcop operator="get" field="parameters.numberSpecified"/> > <calcop operator="get" field="uomConversion.conversionFactor"/> > {code} > The problem exists in trunk and certainly R10.04 (not tested) maybe in previous release though I don't think so, it looks like something introduced with UEL -- 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-3821?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12879360#action_12879360 ] Jacques Le Roux edited comment on OFBIZ-3821 at 6/16/10 11:21 AM: ------------------------------------------------------------------ Yes, thanks David! It should be done upstream... was (Author: jacques.le.roux): Yes, thanks David! > Using number value with calcop operator does not work as thought > ---------------------------------------------------------------- > > Key: OFBIZ-3821 > URL: https://issues.apache.org/jira/browse/OFBIZ-3821 > Project: OFBiz > Issue Type: Bug > Components: framework > Reporter: Jacques Le Roux > Fix For: Release Branch 10.04, SVN trunk > > Attachments: Patch_OFBIZ-3821.patch > > > For instance if you use > {code} > <calcop operator="multiply" field="parameters.numberSpecified"> > <number value="${uomConversion.conversionFactor}"/> > {code} > and have a value > 1000 in conversionFactor you will get 1,000 for number value. It works well if you replace by > {code} > <calcop operator="multiply"> > <calcop operator="get" field="parameters.numberSpecified"/> > <calcop operator="get" field="uomConversion.conversionFactor"/> > {code} > The problem exists in trunk and certainly R10.04 (not tested) maybe in previous release though I don't think so, it looks like something introduced with UEL -- 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-3821?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12879656#action_12879656 ] Shubham Dubey commented on OFBIZ-3821: -------------------------------------- Oh Yes, i got the point,i will try to fix it in locale sensitive manner. Thanks David Shubham Dubey > Using number value with calcop operator does not work as thought > ---------------------------------------------------------------- > > Key: OFBIZ-3821 > URL: https://issues.apache.org/jira/browse/OFBIZ-3821 > Project: OFBiz > Issue Type: Bug > Components: framework > Reporter: Jacques Le Roux > Fix For: Release Branch 10.04, SVN trunk > > Attachments: Patch_OFBIZ-3821.patch > > > For instance if you use > {code} > <calcop operator="multiply" field="parameters.numberSpecified"> > <number value="${uomConversion.conversionFactor}"/> > {code} > and have a value > 1000 in conversionFactor you will get 1,000 for number value. It works well if you replace by > {code} > <calcop operator="multiply"> > <calcop operator="get" field="parameters.numberSpecified"/> > <calcop operator="get" field="uomConversion.conversionFactor"/> > {code} > The problem exists in trunk and certainly R10.04 (not tested) maybe in previous release though I don't think so, it looks like something introduced with UEL -- 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-3821?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Shubham Dubey updated OFBIZ-3821: --------------------------------- Attachment: OFBIZ-3821.patch.zip Here is the updated patch. Thanks Shubham Dubey > Using number value with calcop operator does not work as thought > ---------------------------------------------------------------- > > Key: OFBIZ-3821 > URL: https://issues.apache.org/jira/browse/OFBIZ-3821 > Project: OFBiz > Issue Type: Bug > Components: framework > Reporter: Jacques Le Roux > Fix For: Release Branch 10.04, SVN trunk > > Attachments: OFBIZ-3821.patch.zip, Patch_OFBIZ-3821.patch > > > For instance if you use > {code} > <calcop operator="multiply" field="parameters.numberSpecified"> > <number value="${uomConversion.conversionFactor}"/> > {code} > and have a value > 1000 in conversionFactor you will get 1,000 for number value. It works well if you replace by > {code} > <calcop operator="multiply"> > <calcop operator="get" field="parameters.numberSpecified"/> > <calcop operator="get" field="uomConversion.conversionFactor"/> > {code} > The problem exists in trunk and certainly R10.04 (not tested) maybe in previous release though I don't think so, it looks like something introduced with UEL -- 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-3821?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Jacques Le Roux closed OFBIZ-3821. ---------------------------------- Resolution: Fixed Thanks Shubham, Your patch is in trunk at r955568, R10.04 at r955571 > Using number value with calcop operator does not work as thought > ---------------------------------------------------------------- > > Key: OFBIZ-3821 > URL: https://issues.apache.org/jira/browse/OFBIZ-3821 > Project: OFBiz > Issue Type: Bug > Components: framework > Reporter: Jacques Le Roux > Fix For: Release Branch 10.04, SVN trunk > > Attachments: OFBIZ-3821.patch.zip, Patch_OFBIZ-3821.patch > > > For instance if you use > {code} > <calcop operator="multiply" field="parameters.numberSpecified"> > <number value="${uomConversion.conversionFactor}"/> > {code} > and have a value > 1000 in conversionFactor you will get 1,000 for number value. It works well if you replace by > {code} > <calcop operator="multiply"> > <calcop operator="get" field="parameters.numberSpecified"/> > <calcop operator="get" field="uomConversion.conversionFactor"/> > {code} > The problem exists in trunk and certainly R10.04 (not tested) maybe in previous release though I don't think so, it looks like something introduced with UEL -- 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-3821?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12879783#action_12879783 ] Shubham Dubey commented on OFBIZ-3821: -------------------------------------- Thanks Jacques Shubham Dubey > Using number value with calcop operator does not work as thought > ---------------------------------------------------------------- > > Key: OFBIZ-3821 > URL: https://issues.apache.org/jira/browse/OFBIZ-3821 > Project: OFBiz > Issue Type: Bug > Components: framework > Reporter: Jacques Le Roux > Fix For: Release Branch 10.04, SVN trunk > > Attachments: OFBIZ-3821.patch.zip, Patch_OFBIZ-3821.patch > > > For instance if you use > {code} > <calcop operator="multiply" field="parameters.numberSpecified"> > <number value="${uomConversion.conversionFactor}"/> > {code} > and have a value > 1000 in conversionFactor you will get 1,000 for number value. It works well if you replace by > {code} > <calcop operator="multiply"> > <calcop operator="get" field="parameters.numberSpecified"/> > <calcop operator="get" field="uomConversion.conversionFactor"/> > {code} > The problem exists in trunk and certainly R10.04 (not tested) maybe in previous release though I don't think so, it looks like something introduced with UEL -- 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 |