Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sort order missing on Downloadable Product Links and Sample Columns #21278

Closed
mahesh-rajawat opened this issue Feb 15, 2019 · 6 comments
Closed
Labels
Component: Downloadable Fixed in 2.2.x The issue has been fixed in 2.2 release line Fixed in 2.3.x The issue has been fixed in 2.3 release line Issue: Confirmed Gate 3 Passed. Manual verification of the issue completed. Issue is confirmed Issue: Format is valid Gate 1 Passed. Automatic verification of issue format passed Issue: Ready for Work Gate 4. Acknowledged. Issue is added to backlog and ready for development Reproduced on 2.2.x The issue has been reproduced on latest 2.2 release Reproduced on 2.3.x The issue has been reproduced on latest 2.3 release

Comments

@mahesh-rajawat
Copy link
Member

Preconditions (*)

  1. Magento 2.2
  2. Magento 2.3.0

Steps to reproduce (*)

  1. I need to add a column after Links Title column programatically.
  2. I have created a plugin of
    \Magento\Downloadable\Ui\DataProvider\Product\Form\Modifier\Links::modifyMeta()
namespace Webkul\Test\Plugin\Magento\Downloadable\Ui\DataProvider\Product\Form\Modifier;
use Magento\Catalog\Model\Locator\LocatorInterface;
use Magento\Downloadable\Ui\DataProvider\Product\Form\Modifier\Composite;
use Magento\Framework\Stdlib\ArrayManager;
use Magento\Ui\Component\Container;
use Magento\Ui\Component\Form;
/**
 * Links class
 */
class Links 
{
    /**
     *
     * @param \Webkul\Test\Helper\Data $helper
     */
    public function __construct(
        LocatorInterface $locator,
        ArrayManager $arrayManager,
        \Webkul\Test\Helper\Data $helper
    ) {
        $this->helper = $helper;
        $this->locator = $locator;
        $this->arrayManager = $arrayManager;
    }
    /**
     * @see \Magento\Downloadable\Ui\DataProvider\Product\Form\Modifier\Links::modifyMeta()
     */
    public function afterModifyMeta (
        \Magento\Downloadable\Ui\DataProvider\Product\Form\Modifier\Links $subject,
        $result
    ) {
            $recordPath = $this->arrayManager->findPath('record', $result, null, 'children');
            $result = $this->arrayManager->merge(
                $recordPath.'/children',
                $result,
                array_merge(
                    [
                        'resolution' => $this->getResolutionColumn()
                    ]
                )
                
            );
        return $result;
    }
    /**
     * @return array
     */
    protected function getResolutionColumn()
    {
        $titleContainer['arguments']['data']['config'] = [
            'componentType' => Container::NAME,
            'formElement' => Container::NAME,
            'component' => 'Magento_Ui/js/form/components/group',
            'label' => __('Resolution'),
            'showLabel' => false,
            'dataScope' => '',
            'sortOrder' => 15,
        ];
        $titleField['arguments']['data']['config'] = [
            'formElement' => Form\Element\Input::NAME,
            'componentType' => Form\Field::NAME,
            'dataType' => Form\Element\DataType\Text::NAME,
            'dataScope' => 'resolution',
            'validation' => [
                'required-entry' => true,
            ],
        ];
        return $this->arrayManager->set('children/resolution', $titleContainer, $titleField);
    }
}
  1. After applying this code with sortOrder 15 on this custom column the links table columns misplaced

Expected result (*)

  1. This custom column must be insert after Title Column

Actual result (*)

download

@magento-engcom-team
Copy link
Contributor

Hi @maheshWebkul721. Thank you for your report.
To help us process this issue please make sure that you provided the following information:

  • Summary of the issue
  • Information on your environment
  • Steps to reproduce
  • Expected and actual results

Please make sure that the issue is reproducible on the vanilla Magento instance following Steps to reproduce. To deploy vanilla Magento instance on our environment, please, add a comment to the issue:

@magento-engcom-team give me 2.3-develop instance - upcoming 2.3.x release

For more details, please, review the Magento Contributor Assistant documentation.

@maheshWebkul721 do you confirm that you was able to reproduce the issue on vanilla Magento instance following steps to reproduce?

  • yes
  • no

@magento-engcom-team magento-engcom-team added the Issue: Format is valid Gate 1 Passed. Automatic verification of issue format passed label Feb 15, 2019
@shikhamis11 shikhamis11 self-assigned this Feb 16, 2019
@magento-engcom-team
Copy link
Contributor

magento-engcom-team commented Feb 16, 2019

Hi @shikhamis11. Thank you for working on this issue.
In order to make sure that issue has enough information and ready for development, please read and check the following instruction: 👇

  • 1. Verify that issue has all the required information. (Preconditions, Steps to reproduce, Expected result, Actual result).

    DetailsIf the issue has a valid description, the label Issue: Format is valid will be added to the issue automatically. Please, edit issue description if needed, until label Issue: Format is valid appears.

  • 2. Verify that issue has a meaningful description and provides enough information to reproduce the issue. If the report is valid, add Issue: Clear Description label to the issue by yourself.

  • 3. Add Component: XXXXX label(s) to the ticket, indicating the components it may be related to.

  • 4. Verify that the issue is reproducible on 2.3-develop branch

    Details- Add the comment @magento-engcom-team give me 2.3-develop instance to deploy test instance on Magento infrastructure.
    - If the issue is reproducible on 2.3-develop branch, please, add the label Reproduced on 2.3.x.
    - If the issue is not reproducible, add your comment that issue is not reproducible and close the issue and stop verification process here!

  • 5. Verify that the issue is reproducible on 2.2-develop branch.

    Details- Add the comment @magento-engcom-team give me 2.2-develop instance to deploy test instance on Magento infrastructure.
    - If the issue is reproducible on 2.2-develop branch, please add the label Reproduced on 2.2.x

  • Next steps are available in case you are a member of Community Maintainers.

  • 6. Add label Issue: Confirmed once verification is complete.

  • 7. Make sure that automatic system confirms that report has been added to the backlog.

@mahesh-rajawat mahesh-rajawat added Reproduced on 2.3.x The issue has been reproduced on latest 2.3 release Component: Downloadable Reproduced on 2.2.x The issue has been reproduced on latest 2.2 release labels Feb 17, 2019
@mahesh-rajawat
Copy link
Member Author

@magento-engcom-team issue can be reproduced.

@shikhamis11 shikhamis11 added the Issue: Confirmed Gate 3 Passed. Manual verification of the issue completed. Issue is confirmed label Feb 18, 2019
@magento-engcom-team
Copy link
Contributor

✅ Confirmed by @shikhamis11
Thank you for verifying the issue. Based on the provided information internal tickets MAGETWO-98301, MAGETWO-98302 were created

Issue Available: @shikhamis11, You will be automatically unassigned. Contributors/Maintainers can claim this issue to continue. To reclaim and continue work, reassign the ticket to yourself.

@magento-engcom-team magento-engcom-team added the Issue: Ready for Work Gate 4. Acknowledged. Issue is added to backlog and ready for development label Feb 18, 2019
@magento-engcom-team
Copy link
Contributor

Hi @maheshWebkul721. Thank you for your report.
The issue has been fixed in #21279 by @maheshWebkul721 in 2.3-develop branch
Related commit(s):

The fix will be available with the upcoming 2.3.2 release.

@magento-engcom-team magento-engcom-team added the Fixed in 2.3.x The issue has been fixed in 2.3 release line label Mar 8, 2019
magento-engcom-team added a commit that referenced this issue Mar 8, 2019
 - Merge Pull Request #21279 from maheshWebkul721/magento2:add-sort-order-downloadable-links
 - Merged commits:
   1. c9a9d64
   2. 92d2a3c
magento-engcom-team added a commit that referenced this issue Mar 8, 2019
 - Merge Pull Request #21279 from maheshWebkul721/magento2:add-sort-order-downloadable-links
 - Merged commits:
   1. c9a9d64
   2. 92d2a3c
   3. 03f0c3a
   4. 81a4de8
@magento-engcom-team magento-engcom-team added the Fixed in 2.2.x The issue has been fixed in 2.2 release line label Mar 20, 2019
@magento-engcom-team
Copy link
Contributor

Hi @maheshWebkul721. Thank you for your report.
The issue has been fixed in #21662 by @mage2pratik in 2.2-develop branch
Related commit(s):

The fix will be available with the upcoming 2.2.9 release.

magento-engcom-team added a commit that referenced this issue Mar 20, 2019
… links #21662

 - Merge Pull Request #21662 from mage2pratik/magento2:2.2-develop-PR-port-21279
 - Merged commits:
   1. f80d382
   2. b7ad075
   3. a9016e9
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Component: Downloadable Fixed in 2.2.x The issue has been fixed in 2.2 release line Fixed in 2.3.x The issue has been fixed in 2.3 release line Issue: Confirmed Gate 3 Passed. Manual verification of the issue completed. Issue is confirmed Issue: Format is valid Gate 1 Passed. Automatic verification of issue format passed Issue: Ready for Work Gate 4. Acknowledged. Issue is added to backlog and ready for development Reproduced on 2.2.x The issue has been reproduced on latest 2.2 release Reproduced on 2.3.x The issue has been reproduced on latest 2.3 release
Projects
None yet
Development

No branches or pull requests

3 participants