You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@ofbiz.apache.org by "toaditi (via GitHub)" <gi...@apache.org> on 2026/06/30 13:24:29 UTC

[PR] Fixed: Type mismatch when filtering InventoryItem by availableToPromiseTotal in FixedAssetMaintServices (OFBIZ-13448) [ofbiz-plugins]

toaditi opened a new pull request, #309:
URL: https://github.com/apache/ofbiz-plugins/pull/309

   Jira: https://issues.apache.org/jira/browse/OFBIZ-13448
   
   ## Problem
   In `FixedAssetMaintServices.issueInventory`, the InventoryItem lookup builds a condition comparing `availableToPromiseTotal` against the **String** literal `"0"`:
   
   ```java
   EntityCondition.makeCondition("availableToPromiseTotal", EntityOperator.GREATER_THAN, "0")
   ```
   
   `InventoryItem.availableToPromiseTotal` is a `fixed-point` field (`java.math.BigDecimal`, `NUMERIC(18,6)`). When the query executes, `SqlJdbcUtil` binds the value by casting it to `java.math.BigDecimal`, so passing a `String` throws a `ClassCastException` (String cannot be cast to BigDecimal). The equivalent EECA (`product/entitydef/eecas.xml`) avoids this by declaring `type="BigDecimal"` on the value; the Java path had no such coercion.
   
   ## Fix
   Use `BigDecimal.ZERO` instead of the string `"0"`, and add the `java.math.BigDecimal` import.
   
   ## Verification
   - `./gradlew compileJava` → BUILD SUCCESSFUL.
   
   This is the same fix proposed on the Jira issue, corrected: the issue text used `BigDecimal.Zero` (does not compile) and omitted the required import.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@ofbiz.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Fixed: Type mismatch when filtering InventoryItem by availableToPromiseTotal in FixedAssetMaintServices (OFBIZ-13448) [ofbiz-plugins]

Posted by "arunpati (via GitHub)" <gi...@apache.org>.
arunpati merged PR #309:
URL: https://github.com/apache/ofbiz-plugins/pull/309


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@ofbiz.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Fixed: Type mismatch when filtering InventoryItem by availableToPromiseTotal in FixedAssetMaintServices (OFBIZ-13448) [ofbiz-plugins]

Posted by "sonarqubecloud[bot] (via GitHub)" <gi...@apache.org>.
sonarqubecloud[bot] commented on PR #309:
URL: https://github.com/apache/ofbiz-plugins/pull/309#issuecomment-4843957594

   ## [![Quality Gate Passed](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/QualityGateBadge/qg-passed-20px.png 'Quality Gate Passed')](https://sonarcloud.io/dashboard?id=apache_ofbiz-plugins&pullRequest=309) **Quality Gate passed**  
   Issues  
   ![](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/passed-16px.png '') [0 New issues](https://sonarcloud.io/project/issues?id=apache_ofbiz-plugins&pullRequest=309&issueStatuses=OPEN,CONFIRMED&sinceLeakPeriod=true)  
   ![](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/accepted-16px.png '') [0 Accepted issues](https://sonarcloud.io/project/issues?id=apache_ofbiz-plugins&pullRequest=309&issueStatuses=ACCEPTED)
   
   Measures  
   ![](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/passed-16px.png '') [0 Security Hotspots](https://sonarcloud.io/project/security_hotspots?id=apache_ofbiz-plugins&pullRequest=309&issueStatuses=OPEN,CONFIRMED&sinceLeakPeriod=true)  
   ![](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/passed-16px.png '') [0.0% Coverage on New Code](https://sonarcloud.io/component_measures?id=apache_ofbiz-plugins&pullRequest=309&metric=new_coverage&view=list)  
   ![](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/passed-16px.png '') [0.0% Duplication on New Code](https://sonarcloud.io/component_measures?id=apache_ofbiz-plugins&pullRequest=309&metric=new_duplicated_lines_density&view=list)  
     
   <!-- sqra-placement-anchor -->
   [See analysis details on SonarQube Cloud](https://sonarcloud.io/dashboard?id=apache_ofbiz-plugins&pullRequest=309)
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@ofbiz.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org