DoctrineExtensions icon indicating copy to clipboard operation
DoctrineExtensions copied to clipboard

[Sortable] Fix duplicated position when position for more than one object is changed manually

Open januszmk opened this issue 3 years ago • 2 comments

I discovered issue where if you edit 2 objects positions, relocation code changes second object position to be the same as existing record in db. I removed that relocation change and sorted in DESC order objects for update to make position updates correct

januszmk avatar Mar 25 '22 12:03 januszmk

Codecov Report

Merging #2439 (a500374) into main (501f1a1) will increase coverage by 0.04%. The diff coverage is 100.00%.

@@             Coverage Diff              @@
##               main    #2439      +/-   ##
============================================
+ Coverage     80.08%   80.12%   +0.04%     
+ Complexity     3140     3136       -4     
============================================
  Files           158      158              
  Lines          7702     7700       -2     
============================================
+ Hits           6168     6170       +2     
+ Misses         1534     1530       -4     
Impacted Files Coverage Δ
src/Sortable/Mapping/Event/Adapter/ORM.php 80.70% <100.00%> (ø)
src/Sortable/SortableListener.php 96.66% <100.00%> (+1.62%) :arrow_up:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update e255785...a500374. Read the comment docs.

codecov-commenter avatar May 06 '22 21:05 codecov-commenter

@januszmk You need to rebase onto the latest main to make the phpstan error go away and add a newline after SortableTest->testShouldShiftPositionForward() to fix the code style..

dritter avatar Jun 07 '22 19:06 dritter

Hi, I stumbled upon the same bug. This PR seems to fix the bug. Is there anything blocking a merge?

core23 avatar Oct 22 '22 14:10 core23

thanks @januszmk!

franmomu avatar Oct 24 '22 06:10 franmomu

Can you please tag new release @franmomu ?

core23 avatar Nov 06 '22 17:11 core23

v3.10.0 was released. /cc @core23.

phansys avatar Nov 14 '22 20:11 phansys