You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Until v3.2.3 duplicating a product duplicated the price.
Since v3.2.4 the product duplication does not duplicate the price.
Looks like it comes from the PR #4639 :/
Reproduced in #4971
The code looks like price is supposed to be copied: Spree::ProductDuplicator#duplicate_master
defduplicate_mastermaster=product.mastermaster.dup.tapdo |new_master|
new_master.sku="COPY OF #{master.sku}"new_master.deleted_at=nilnew_master.images=master.images.map{ |image| duplicate_imageimage}if@include_imagesnew_master.price=master.priceendend
Solidus Version: 3.3.1 (Appeared in 3.2.4 but we went from 3.0.8 to 3.3.1)
To Reproduce
Add this test in solidus/core/spec/models/spree/product_duplicator_spec.rb around l.60 ( context "product attributes" )
it"will set the same price"doexpect(new_product.reload.price).toeqlproduct.priceend
➜ solidus git:(v3.2.4) ✗ (cd core && env DB=postgresql bundle exec rspec /Users/j.garibotti/work/solidus/core/spec/models/spree/product_duplicator_spec.rb)
Run options: include {:focus=>true}
All examples were filtered out; ignoring {:focus=>true}
Randomized with seed 41198
.F..........
Failures:
1) Spree::ProductDuplicator product attributes will set the same price price
Failure/Error: expect(new_product.reload.price).to eql product.price
expected: #<BigDecimal: 19.99>
got: nil
(compared using eql?)
# ./spec/models/spree/product_duplicator_spec.rb:65:in `block (3 levels) in <module:Spree>'
Finished in 2.01 seconds (files took 2.39 seconds to load)
12 examples, 1 failure
Failed examples:
rspec ./spec/models/spree/product_duplicator_spec.rb:64 # Spree::ProductDuplicator product attributes will set the same price price
Randomized with seed 41198
Current behavior
Does not duplicate the price.
Expected behavior
The new_product as the same price as the duplicated_product.
The text was updated successfully, but these errors were encountered:
Until v3.2.3 duplicating a product duplicated the price.
Since v3.2.4 the product duplication does not duplicate the price.
Looks like it comes from the PR #4639 :/
Reproduced in #4971
The code looks like price is supposed to be copied:
Spree::ProductDuplicator#duplicate_master
Solidus Version: 3.3.1 (Appeared in 3.2.4 but we went from 3.0.8 to 3.3.1)
To Reproduce
Add this test in
solidus/core/spec/models/spree/product_duplicator_spec.rb
around l.60 (context "product attributes"
)Current behavior
Does not duplicate the price.
Expected behavior
The new_product as the same price as the duplicated_product.
The text was updated successfully, but these errors were encountered: