akeneo / pim-community-dev

[Community Development Repository] The open source Product Information Management (PIM)
http://www.akeneo.com
Other
952 stars 516 forks source link

Product not exported by csv after adding category by Mass edit #8475

Open ankit-sf opened 6 years ago

ankit-sf commented 6 years ago

I'm reporting a Bug

Akeneo version: 2.2.4, 2.3.1 (checked on demo.akeneo.com)

Hello, Normally product/variant products can be exported by CSV product export when they are in any category and satisfy given filter in jobs.

Steps to reproduce:

Step1: Create a Product model with some child products (variations). Don't add any category to them. Step 2: Now, By Mass edit Assign a category to Product model. Step 3: Run CSV product export job

But after that child products would not be exported in CSV export job.

Will show in CSV export once you save them by editing.

Expected result: Child products should be exported in CSV export job.

Actual result:

Child products don't get export in CSV export job.

Images: step2: https://image.prntscr.com/image/E1_y-HBXTWSppaCxQN7IUQ.png after step2: https://image.prntscr.com/image/DA88mdyCQNuf8m_edVztmA.png export job: https://image.prntscr.com/image/YQ4GmF7yRKqhUWuDuifyIQ.png no product export: https://image.prntscr.com/image/DJLZgMGwTfal-o_Glw589Q.png

P.S.: Also why only products having some categories are exported.

damien-carcel commented 6 years ago

Hello @ankit-sf .

Thanks for raising this issue. I can reproduce your behavior. It comes from the Elasticsearch indexation. When adding a category to a product model, in MySQL, the category is only added to the product model. Products appears to be classified too because we display the category of their ancestors.

However, we use Elasticsearch to query the products, both on the data grid, and in the exports. When saving the product model, its children are indexed too, and the model categories are added to the products in the index.

But this doesn't work for the mass edit: products are not reindexed. So in ES, the products are not classified, thus not exported.

I'm going to open a bug on our internal bug tracker.

Best regards, Damien.

ankit-sf commented 6 years ago

Thanks for noting it down, But I have a question why are only products having some categories exported?

damien-carcel commented 6 years ago

It was a business decision. Product owners consider that to be exported to another system, like a e-commerce web site, products should be complete, active and classified. The quick-export allows the users to override this rule. You are not the first one to ask this question, and maybe the export builder should allow to export unclassified products, like it allows to export incomplete or inactive ones.

ptitkosmos commented 6 years ago

Hello @ankit-sf .

Thanks for raising this issue. I can reproduce your behavior. It comes from the Elasticsearch indexation. When adding a category to a product model, in MySQL, the category is only added to the product model. Products appears to be classified too because we display the category of their ancestors.

However, we use Elasticsearch to query the products, both on the data grid, and in the exports. When saving the product model, its children are indexed too, and the model categories are added to the products in the index.

But this doesn't work for the mass edit: products are not reindexed. So in ES, the products are not classified, thus not exported.

I'm going to open a bug on our internal bug tracker.

Best regards, Damien.

Hello Any update for this issue ?

dseng-tbd commented 6 years ago

I also encountered the problem and have no solution than reindexing elasticsearch after a mass action which is not convenient with a lot a products. Any progress ?

ankit-sf commented 5 years ago

any update? Thanks

(in which akeneo version, it is corrected?) because we are not updating our akeneo system frequently