pimcore / advanced-object-search

Advanced Object Search community bundle provides advanced object search in Pimcore backend powered by OpenSearch.
Other
39 stars 44 forks source link

Fix processing count calculation #218

Closed NiklasBr closed 1 year ago

NiklasBr commented 1 year ago

Prior to this patch the count would always be $list->getOffset() + $elementsPerLoop which was not the correct count. If the total number of elements was less than 100 for example, it would write:

Processing Article: 100/14
Processing Brand: 100/1
Processing Item: 100/248
Processing Item: 200/248
Processing Item: 300/248
Processing MainMaterials: 100/1
Processing Option: 100/31
Processing Season: 100/3
Processing SizeRange: 100/2
Processing SleeveLength: 100/1
Processing Store: 100/1
Processing Tag: 100/9

After this change the output would be:

Processing Article: 14/14
Processing Brand: 1/1
Processing Item: 100/248
Processing Item: 200/248
Processing Item: 248/248
Processing MainMaterials: 1/1
Processing Option: 31/31
Processing Season: 3/3
Processing SizeRange: 2/2
Processing SleeveLength: 1/1
Processing Store: 1/1
Processing Tag: 9/9
CLAassistant commented 1 year ago

CLA assistant check
All committers have signed the CLA.

mattamon commented 1 year ago

Hey @NiklasBr, since we released 5.0 already, could you please rebase this PR to 5.0 instead of 5.x. Thank you!

NiklasBr commented 1 year ago

@mattamon I did the rebase