(OFBIZ-11947)
This is done for applications component. Also corrected some variables as per naming convention best practices.
Thanks Jacques for review.
This is how I intended to do it. But, since I have a save action to format
edited lines, Eclipse forced an "unwrapping". I had to check in "Line Wrapping":
"Never join already wrapped lines", pfew!
There are some inconsistencies in the code for string comparison statusId.equals(PRUN_COMPLETED) whereas it should be written as PRUN_COMPLETED.equals(statusId) cause the former can throw NullPointerException if the variable found to be NULL.
Thanks: Devanshu for your contribution.
This can be tested using
./gradlew "ofbiz --test component=product --test suitename=producttagtests"
Thanks: Akash Jain for report, Anushi Gupta for the patch
Changes made in startsWith and indexOf methods in ContentManagementServices
for OFBIZ-9254 where wrong (reversed). Fortunately only place where this happened.
I added a comment to make clear why we have 2 empty else if
I'll backport later, conflicts to handle by hand...
Thanks: Ankush Upadhyay for spotting the bug
The order created with test case testCreateOrderServiceProduct did not get
approved so the quick ship process did not work correctly while with specific
configurableServiceOrder-test new order has got approved and the quick ship
process worked correctly.
We got multiple payment methods i.e. EXT_PAYPAL and EXT_COD but in the test case
only EXT_COD was defined.
Without shopping cart tests testIntegration works perfectly.
Shopping cart has multiple payment methods, and as cart has multiple payment
methods, order is not approved
(org/apache/ofbiz/order/shoppingcart/CheckOutHelper.java:1166)
This ensures single paymentMethod. It could reviewed again when converting
ShoppingCartTests.xml to Groovy. I have added a comment about that
Thanks: Pawan and Suraj
Revert "Improved: Convert voidPayment service from mini-lang to groovy DSL (OFBIZ-11487)"
This reverts commit faa59b325f.
I wrongly put back 2 files not part of faa59b325 commit
CostTests.xml
ProductPriceTests.xml
This removes them
This reverts commit faa59b325f.
It introduced 3 errors in testIntegration, in:
testGlPostingOnCancelCheckRun
testGlPostingsOnVoidPayment
testVoidPayment
When creating event for the party other than the loggedin user, the party should be in CAL_OWNER role to be added to event. Added appropriate check in service along with the error message.
Thanks Rubia Elza Joshep for reporting the issue and Aditi Patidar for providing the patch
On orderview screen at the ordermgr, when a user tries to change the status of
the order, in OrderInfo.ftl, we are calling "changeOrderStatus" request as
<@ofbizUrl>changeOrderStatus/orderview</@ofbizUrl>
Hence when the request is done, it is rewriting URL to
https://localhost:8443/ordermgr/control/changeOrderStatus/orderview.
When js functions running in the backend like "getAssociatedStateList" are
called, they are getting the wrong URL to send a request to. This was causing
the issue.
For now, there are two different fixes that can handle both problems which are
mentioned in OFBIZ-2562 and OFBIZ-11838.
1.
To change the request mapping for "changeOrderStatus" and add request-redirect
to "orderview" screen. Change the actions in the forms in OrderInfo.ftl to
call "changeOrderStatus" request only and then remove code in
"getAssociatedStateList" js function to rewrite URL.
2.
To add .length to the existing URL rewrite code written in
"getAssociatedStateList" js function as
if (jQuery('#orderViewed').length) {
requestToSend = "/ordermgr/control/getAssociatedStateList"
}
Thanks: Pritam Kute!
I picked the 2nd solution