Skip to content

Commit

Permalink
🔃 [EngCom] Public Pull Requests - 2.3-develop
Browse files Browse the repository at this point in the history
Accepted Public Pull Requests:
 - #19135: Calling getCurrentUrl on Store will wrongly add "___store" parameter #18941 (by @Nazar65)
 - #19302: fixed Notification page Select Visible items issue  (by @shikhamis11)
 - magento-engcom/import-export-improvements#153: Added notes and tooltip to import behavior field in import form (by @federivo)
 - #18069: Add CatalogSearch no results handle (by @progreg)
 - #19080: [BUGFIX] Forward-port of #14861 for Magento 2.3 (by @kanduvisla)
 - #17806: 17754-Fixed validation while creating new product attributes in admin (by @saravananvelu)
 - #19839: Fixed minicart cancel button area overlapping issue (by @gelanivishal)
 - #19736: [Review] Integration tests for not allowed review submission (by @eduard13)
 - #19769: Minor typos corrected. (by @milindsingh)
 - #19762: Typo corrected Update bound-nodes.js (by @developerarun)
 - #19222: Cleaned up PriceCurrency class (by @dverkade)
 - #19537: Resolved bad parameter on function (by @jaimin-ktpl)
 - #19726: Typo "customet_id" to  "customer_id" fixed. (by @milindsingh)
 - #19711: Check repository label for possible non-string value (by @poveu)
 - #19702: Small fix in classes (by @iskolesnyk)
 - #19634: Fixed - Lifetime update syntax error #13309 (by @ssp58bleuciel)
 - #19672: fix: simplify literal boolean checks (by @DanielRuf)
 - #19514: Fixed upgrade issue if manufacturer attribute not exist in the database (by @suneet64)
 - #19134: [Framework] New Link is not correctly shown as Current if contains default parts (by @eduard13)


Fixed GitHub Issues:
 - #18941: Calling getCurrentUrl on Store will wrongly add "___store" parameter (reported by @LucaGallinari) has been fixed in #19135 by @Nazar65 in 2.3-develop branch
   Related commits:
     1. 0e8cd9f
     2. 300772d
     3. b9a37ce
     4. 1378074
     5. 70d76c7
     6. 2e5697d
     7. b9f72f7
     8. 22edbb9
     9. 3c869e7
     10. f1363cf

 - #19285: On Notification page Select All and Select Visible both works same (reported by @hellotaran) has been fixed in #19302 by @shikhamis11 in 2.3-develop branch
   Related commits:
     1. 58514a0
     2. a4b989b
     3. c805752
     4. 4599646
     5. daf5fb9
     6. c23a55c
     7. 9de0884
     8. ac1355e
     9. 77670fa
     10. fad31c6
     11. d2e5d87

 - #18038: Add a custom layout handle when there are no search results (reported by @qsolutions-pl) has been fixed in #18069 by @progreg in 2.3-develop branch
   Related commits:
     1. 23666ac
     2. 158a0fd
     3. d2c2c00
     4. ac8d426
     5. 258703c
     6. ca8b15b
     7. c1cbd00

 - #14861: M2.2.3 : Unexpected behaviour when programmatically assigning products to a category (reported by @kanduvisla) has been fixed in #19080 by @kanduvisla in 2.3-develop branch
   Related commits:
     1. 3905580
     2. c2100db
     3. d904697
     4. 9b919f9
     5. 9cb7a89

 - #17754: Misleading error in Add Product Attribute screen (reported by @milossh) has been fixed in #17806 by @saravananvelu in 2.3-develop branch
   Related commits:
     1. 90b1c76
     2. 22c185e

 - #19836: Minicart cancel button area overlapping to cart subtotal label (reported by @cedarvinda) has been fixed in #19839 by @gelanivishal in 2.3-develop branch
   Related commits:
     1. fca6649
     2. d4ebf75

 - #17442: Order getCreatedAtFormatted has bad params (reported by @patoch14) has been fixed in #19537 by @jaimin-ktpl in 2.3-develop branch
   Related commits:
     1. 4a1d103

 - #19721: Typo in SalesRule/Model/ResourceModel/Coupon/Usage.php (reported by @Delwin444) has been fixed in #19726 by @milindsingh in 2.3-develop branch
   Related commits:
     1. a2bac04

 - #13309: Lifetime update syntax error (reported by @navalnichnik) has been fixed in #19634 by @ssp58bleuciel in 2.3-develop branch
   Related commits:
     1. 146f74a
     2. 70056f5

 - #19099: New Link is not correctly shown as Current if contains default parts (reported by @eduard13) has been fixed in #19134 by @eduard13 in 2.3-develop branch
   Related commits:
     1. 29640f1
     2. fea9aaf
     3. 508832b
     4. 769e46d
     5. 4241175
     6. 3ee9190
     7. 2f8314c
     8. 64daebd
     9. a912d27
  • Loading branch information
magento-engcom-team authored Dec 19, 2018
2 parents 9cb874f + a703ac5 commit 4ee3bb3
Show file tree
Hide file tree
Showing 38 changed files with 670 additions and 136 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@
namespace Magento\AdminNotification\Model\System\Message\Media\Synchronization;

/**
* Media synchronization error message class.
*
* @api
* @since 100.0.2
*/
Expand All @@ -27,7 +29,7 @@ class Error extends \Magento\AdminNotification\Model\System\Message\Media\Abstra
protected function _shouldBeDisplayed()
{
$data = $this->_syncFlag->getFlagData();
return isset($data['has_errors']) && true == $data['has_errors'];
return !empty($data['has_errors']);
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
namespace Magento\AdminNotification\Model\System\Message\Media\Synchronization;

/**
* Media synchronization success message class.
*
* @api
* @since 100.0.2
*/
Expand All @@ -27,8 +29,8 @@ protected function _shouldBeDisplayed()
{
$state = $this->_syncFlag->getState();
$data = $this->_syncFlag->getFlagData();
$hasErrors = isset($data['has_errors']) && true == $data['has_errors'] ? true : false;
return false == $hasErrors && \Magento\MediaStorage\Model\File\Storage\Flag::STATE_FINISHED == $state;
$hasErrors = !empty($data['has_errors']);
return !$hasErrors && \Magento\MediaStorage\Model\File\Storage\Flag::STATE_FINISHED == $state;
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ public function getColumns(SelectBuilder $selectBuilder, $entityConfig)
$columnName = $this->nameResolver->getName($attributeData);
if (isset($attributeData['function'])) {
$prefix = '';
if (isset($attributeData['distinct']) && $attributeData['distinct'] == true) {
if (!empty($attributeData['distinct'])) {
$prefix = ' DISTINCT ';
}
$expression = new ColumnValueExpression(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ public function testPrepareExportData($isArchiveSourceDirectory)
->with(
$archiveSource,
$archiveAbsolutePath,
$isArchiveSourceDirectory ? true : false
$isArchiveSourceDirectory
);

$fileContent = 'Some text';
Expand Down Expand Up @@ -222,7 +222,7 @@ public function prepareExportDataDataProvider()
{
return [
'Data source for archive is directory' => [true],
'Data source for archive doesn\'t directory' => [false],
'Data source for archive isn\'t directory' => [false],
];
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,13 @@
* See COPYING.txt for license details.
*/

namespace Magento\Backend\Block\Widget\Form\Element;

/**
* Form element dependencies mapper
* Assumes that one element may depend on other element values.
* Will toggle as "enabled" only if all elements it depends from toggle as true.
*/
namespace Magento\Backend\Block\Widget\Form\Element;

/**
*
* @api
* @since 100.0.2
*/
Expand Down Expand Up @@ -117,6 +116,7 @@ public function addConfigOptions(array $options)

/**
* HTML output getter
*
* @return string
*/
protected function _toHtml()
Expand All @@ -139,7 +139,8 @@ protected function _toHtml()
}

/**
* Field dependences JSON map generator
* Field dependencies JSON map generator
*
* @return string
*/
protected function _getDependsJson()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
namespace Magento\Backend\Block\Widget\Grid\Massaction;

use Magento\Backend\Block\Widget\Grid\Massaction\VisibilityCheckerInterface as VisibilityChecker;
use Magento\Framework\Data\Collection\AbstractDb;
use Magento\Framework\DataObject;

/**
Expand Down Expand Up @@ -52,7 +53,7 @@ public function __construct(
}

/**
* @return void
* @inheritdoc
*/
protected function _construct()
{
Expand Down Expand Up @@ -217,6 +218,7 @@ public function getGridJsObjectName()
* Retrieve JSON string of selected checkboxes
*
* @return string
* @SuppressWarnings(PHPMD.RequestAwareBlockMethod)
*/
public function getSelectedJson()
{
Expand All @@ -231,6 +233,7 @@ public function getSelectedJson()
* Retrieve array of selected checkboxes
*
* @return string[]
* @SuppressWarnings(PHPMD.RequestAwareBlockMethod)
*/
public function getSelected()
{
Expand All @@ -252,6 +255,8 @@ public function getApplyButtonHtml()
}

/**
* Get mass action javascript code.
*
* @return string
*/
public function getJavaScript()
Expand All @@ -268,6 +273,8 @@ public function getJavaScript()
}

/**
* Get grid ids in JSON format.
*
* @return string
*/
public function getGridIdsJson()
Expand All @@ -284,6 +291,11 @@ public function getGridIdsJson()
$massActionIdField = $this->getParentBlock()->getMassactionIdField();
}

if ($allIdsCollection instanceof AbstractDb) {
$allIdsCollection->getSelect()->limit();
$allIdsCollection->clear();
}

$gridIds = $allIdsCollection->setPageSize(0)->getColumnValues($massActionIdField);
if (!empty($gridIds)) {
return join(",", $gridIds);
Expand All @@ -292,6 +304,8 @@ public function getGridIdsJson()
}

/**
* Get Html id.
*
* @return string
*/
public function getHtmlId()
Expand Down
4 changes: 3 additions & 1 deletion app/code/Magento/Bundle/Pricing/Adjustment/Calculator.php
Original file line number Diff line number Diff line change
Expand Up @@ -198,6 +198,8 @@ protected function getSelectionAmounts(Product $bundleProduct, $searchMin, $useR
}

/**
* Get selection price list provider.
*
* @return SelectionPriceListProviderInterface
* @deprecated 100.2.0
*/
Expand Down Expand Up @@ -281,7 +283,7 @@ public function calculateBundleAmount($basePriceValue, $bundleProduct, $selectio
* @param float $basePriceValue
* @param Product $bundleProduct
* @param \Magento\Bundle\Pricing\Price\BundleSelectionPrice[] $selectionPriceList
* @param null|bool|string|arrayy $exclude
* @param null|bool|string|array $exclude
* @return \Magento\Framework\Pricing\Amount\AmountInterface
*/
protected function calculateFixedBundleAmount($basePriceValue, $bundleProduct, $selectionPriceList, $exclude)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,7 @@ public function testSaveData($skus, $bunch, $allowImport)
'price_type' => 'fixed',
'shipment_type' => '1',
'default_qty' => '1',
'is_defaul' => '1',
'is_default' => '1',
'position' => '1',
'option_id' => '1']
]
Expand All @@ -264,7 +264,7 @@ public function testSaveData($skus, $bunch, $allowImport)
'price_type' => 'percent',
'shipment_type' => 0,
'default_qty' => '2',
'is_defaul' => '1',
'is_default' => '1',
'position' => '6',
'option_id' => '6']
]
Expand Down Expand Up @@ -324,7 +324,7 @@ public function saveDataProvider()
. 'price_type=fixed,'
. 'shipment_type=separately,'
. 'default_qty=1,'
. 'is_defaul=1,'
. 'is_default=1,'
. 'position=1,'
. 'option_id=1 | name=Bundle2,'
. 'type=dropdown,'
Expand All @@ -333,7 +333,7 @@ public function saveDataProvider()
. 'price=10,'
. 'price_type=fixed,'
. 'default_qty=1,'
. 'is_defaul=1,'
. 'is_default=1,'
. 'position=2,'
. 'option_id=2'
],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -197,12 +197,12 @@ public function execute()
$attributeCode = $attributeCode ?: $this->generateCode($this->getRequest()->getParam('frontend_label')[0]);
if (strlen($attributeCode) > 0) {
$validatorAttrCode = new \Zend_Validate_Regex(
['pattern' => '/^[a-z\x{600}-\x{6FF}][a-z\x{600}-\x{6FF}_0-9]{0,30}$/u']
['pattern' => '/^[a-zA-Z\x{600}-\x{6FF}][a-zA-Z\x{600}-\x{6FF}_0-9]{0,30}$/u']
);
if (!$validatorAttrCode->isValid($attributeCode)) {
$this->messageManager->addErrorMessage(
__(
'Attribute code "%1" is invalid. Please use only letters (a-z), ' .
'Attribute code "%1" is invalid. Please use only letters (a-z or A-Z), ' .
'numbers (0-9) or underscore(_) in this field, first character should be a letter.',
$attributeCode
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -118,9 +118,15 @@ private function processCategoryLinks($newCategoryPositions, &$oldCategoryPositi
$result = ['changed' => [], 'updated' => []];

$oldCategoryPositions = array_values($oldCategoryPositions);
$oldCategoryList = array_column($oldCategoryPositions, 'category_id');
foreach ($newCategoryPositions as $newCategoryPosition) {
$key = array_search($newCategoryPosition['category_id'], $oldCategoryList);
$key = false;

foreach ($oldCategoryPositions as $oldKey => $oldCategoryPosition) {
if ((int)$oldCategoryPosition['category_id'] === (int)$newCategoryPosition['category_id']) {
$key = $oldKey;
break;
}
}

if ($key === false) {
$result['changed'][] = $newCategoryPosition;
Expand Down
Loading

0 comments on commit 4ee3bb3

Please sign in to comment.