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

Allow import entity to be preselected #9453

Merged
merged 7 commits into from Sep 7, 2018

Conversation

Projects
None yet
8 participants
@sarjon
Member

sarjon commented Aug 16, 2018

Questions Answers
Branch? develop
Description? See PrestaShop/prestafony-project#58
Type? bug fix
Category? BO
BC breaks? no
Deprecations? no
Fixed ticket? n/a
How to test? Click "Import" in Back Office Catalog page and after redirect to Import page, "Products" should be preselected. Same should work for other import data (Categories, Customers, Addresses & etc.)

This change is Reviewable

@sarjon

This comment has been minimized.

Show comment
Hide comment
@sarjon

sarjon Aug 17, 2018

Member

@mickaelandrieu @PierreRambaud does this need anymore work?

Member

sarjon commented Aug 17, 2018

@mickaelandrieu @PierreRambaud does this need anymore work?

@mickaelandrieu

This comment has been minimized.

Show comment
Hide comment
@mickaelandrieu

mickaelandrieu Aug 17, 2018

Contributor

Fatal error: Cannot use isset() on the result of an expression (you can use "null !== expression" instead) in /home/travis/build/PrestaShop/PrestaShop/src/Core/Import/Entity.php on line 67

Sadly tests are failing :)

Contributor

mickaelandrieu commented Aug 17, 2018

Fatal error: Cannot use isset() on the result of an expression (you can use "null !== expression" instead) in /home/travis/build/PrestaShop/PrestaShop/src/Core/Import/Entity.php on line 67

Sadly tests are failing :)

@PierreRambaud

This comment has been minimized.

Show comment
Hide comment
@PierreRambaud

PierreRambaud Aug 17, 2018

Contributor

@sarjon I fixed your tests, look like php5.6 doesn't like isset with const.. Weird xD

Contributor

PierreRambaud commented Aug 17, 2018

@sarjon I fixed your tests, look like php5.6 doesn't like isset with const.. Weird xD

@sarjon

This comment has been minimized.

Show comment
Hide comment
@sarjon

sarjon Aug 17, 2018

Member

php5.6 doesn't like isset with const

i should switch back to 5.6 when developing. 😞

by the way, thanks! ^^

Member

sarjon commented Aug 17, 2018

php5.6 doesn't like isset with const

i should switch back to 5.6 when developing. 😞

by the way, thanks! ^^

return $entity;
}
return is_numeric($entity) ? $entity : Entity::getFromName($entity);

This comment has been minimized.

@mickaelandrieu

mickaelandrieu Aug 17, 2018

Contributor

this sounds weird, can you explain what is done here?

@mickaelandrieu

mickaelandrieu Aug 17, 2018

Contributor

this sounds weird, can you explain what is done here?

This comment has been minimized.

@sarjon

sarjon Aug 17, 2018

Member

$entity can be both string (for example when you click "Export" in products page, it adds ?import_type=products query param, so it converts this string to actual value which is integer) and integer, which is actual import entity value.

@sarjon

sarjon Aug 17, 2018

Member

$entity can be both string (for example when you click "Export" in products page, it adds ?import_type=products query param, so it converts this string to actual value which is integer) and integer, which is actual import entity value.

@sarjon

This comment has been minimized.

Show comment
Hide comment
@sarjon

sarjon Sep 5, 2018

Member

@PierreRambaud rebased. can you review and add waiting for QA? :)

Member

sarjon commented Sep 5, 2018

@PierreRambaud rebased. can you review and add waiting for QA? :)

@PierreRambaud PierreRambaud added this to the 1.7.5.0 milestone Sep 5, 2018

@marionf marionf assigned marionf and unassigned marionf Sep 5, 2018

@marionf marionf added QA ✔️ and removed waiting for QA labels Sep 5, 2018

@sarjon

This comment has been minimized.

Show comment
Hide comment
@sarjon

sarjon Sep 6, 2018

Member

@PierreRambaud can you rerun travis and merge? ^^

Member

sarjon commented Sep 6, 2018

@PierreRambaud can you rerun travis and merge? ^^

@PierreRambaud

This comment has been minimized.

Show comment
Hide comment
@PierreRambaud

PierreRambaud Sep 6, 2018

Contributor

need rebase :(

Contributor

PierreRambaud commented Sep 6, 2018

need rebase :(

PierreRambaud and others added some commits Aug 17, 2018

@sarjon

This comment has been minimized.

Show comment
Hide comment
@sarjon
Member

sarjon commented Sep 7, 2018

@PierreRambaud rebased.

@PierreRambaud PierreRambaud merged commit ae47720 into PrestaShop:develop Sep 7, 2018

2 checks passed

Codacy/PR Quality Review Up to standards. A positive pull request.
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
@PierreRambaud

This comment has been minimized.

Show comment
Hide comment
@PierreRambaud

PierreRambaud Sep 7, 2018

Contributor

Thanks @sarjon

Contributor

PierreRambaud commented Sep 7, 2018

Thanks @sarjon

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment