Checkout Tools
  • last updated a few minutes ago
Constraints
Constraints: committers
 
Constraints: files
Constraints: dates
Improved: Convert CatalogServices.xml mini lang to groovy

(OFBIZ-9992) (OFBIZ-9350)

Thanks to Dennis Balkir for this conversion

  1. … 3 more files in changeset.
Improved: Inline ‘UtilValidate#areEqual’

(OFBIZ-11172)

‘Objects#equals’ is already providing the same functionality of ‘null’

safe equality check.

  1. … 9 more files in changeset.
Improved: Compile groovy integration tests

(OFBIZ-11165)

Since there is no need for dynamic reload for integration tests,

it is better to compile Groovy tests.

  1. … 61 more files in changeset.
Fixed: Issue in order history promotion.

(OFBIZ-10847)

Issue: According to the promotion customer should spend 000 in any 12 months to avail 5% discount. The system is providing the discount even if the customer is not logged in.

Thanks Lalit Dashora for reporting the issue and providing the patch.

Added: Unit test case for service - createProductFeatureType

(OFBIZ-9089)

Slightly modified patch. Improved class name and file name.

Thanks Pradhan Yash Sharma for reporting and initial patch & Yogesh Naroliya for providing updated patch

    • ?
    ./test/ProductFeatureTypeTests.groovy
  1. … 1 more file in changeset.
Fixed: CatalogServices #duplicateProductCategory doesn't check for

existing categories

(OFBIZ-10328)

This method just crashes, if there is a category which has the same name as

the one the user is trying to create.

There should be a check for existing attributes and a clean return,

no exception throwing.

Thanks: Benjamin Jugl

  1. … 1 more file in changeset.
Fixed: CatalogServices #createProductCategoryAttribute doesn't check for

existing attributes

(OFBIZ-10327)

This method just crashes, if there is an attribute which has the same name as

the one the user is trying to create.

There should be a check for existing attributes and a clean return,

no exception throwing.

Thanks: Dennis Balkir for report and Benjamin Jugl for patch

  1. … 1 more file in changeset.
Improved : Update missing entries in GDSL descriptors and cleanup findOne to use EntityQuery instead.

(OFBIZ-10566)

Deprecation of findOne DSL method in favor of entityQuery from DSL method

  1. … 3 more files in changeset.
Improved: Convert CategoryServices.xml mini lang to groovy

(OFBIZ-10031)

Fixes an issue with previous patch.

The problem was, that the value newEntity was made with the parameters map,

which resulted in a value, which didn't had the sequenced id, that I tried to

fix.

But after removing the map, everything works just fine

Thanks: Dennis Balkir

Improved: Migrate product promotion condition and action rule on SOA

(OFBIZ-10370)

Currently promotion rule engine works with :

entities ProductPromoCond et ProductPromoAction

java linear function ProductPromoWorker.checkCondition() (ProductPromoWorker:910) and ProductPromoWorker.performAction (ProductPromoWorker:1423)

Enumeration list to indicate on java function what piece of code to activate the control or action

The problem with this structure is when you want to create a new case of condition or action, you need to modify the framework code base.

We convert the 2 big java leaner function to service representation with one service by case. To realize it we introduce a relation with CustomMethod :

ProductPromoRule --> ProductPromoCond -> CustomMethod

-> ProductPromoAction -> CustomMethod

Each functions's case are converted to service with a related CustomMethod.

With this pattern now you can write your own condition rule and action rule on your plugin and link it on the promo engine

For backward compatibility purpose, current "PPIP" enumeration entries receive in enumCode data the new corresponding customMethodId reference, to ensure that old data works fine with the new engine

on EntityData

<CustomMethod customMethodId="PPC_PRODUCT_AMOUNT" customMethodTypeId="PRODUCT_PROMO_COND" customMethodName="productPromoCondProductAmount" description="Product amount"/>

<Enumeration enumId="PPIP_PRODUCT_AMOUNT" enumCode="PPC_PRODUCT_AMOUNT"/><!--link enumeration with customMethod for backward compatibility-->

on Java

//for backward compatibility resolve customMethodId from enumCode

GenericValue condEnum = EntityQuery.use(delegator).from("Enumeration").where("enumId", inputParamEnumId).cache().queryOne();

if (condEnum != null) {

customMethod = EntityQuery.use(delegator).from("CustomMethod").where("customMethodId", condEnum.get("enumCode")).cache().queryOne();

if (customMethod == null) {

Debug.logWarning("The oldest enumeration " + inputParamEnumId + " for promo " + productPromoCond.getPkShortValueString() + " haven't the new customMethod to use, please check your data or load seed data", module);

return false;

}

serviceName = customMethod.getString("customMethodName");

}

Many thanks to Ziri Khalifa and Leila Mekika for their helping work

    • ?
    ./promo/ProductPromoActionServices.groovy
    • ?
    ./promo/ProductPromoCondServices.groovy
    • ?
    ./test/ProductPromoActionTests.groovy
    • ?
    ./test/ProductPromoCondTests.groovy
  1. … 11 more files in changeset.
Improved: Convert CategoryServices.xml mini lang to groovy (OFBIZ-10031)

thanks to Dennis Balkir for this help to minilang conversion

  1. … 5 more files in changeset.