Skip to content

Fix moving items down in the epic tree

Jarka Košanová requested to merge 35532-fix-epics-reorder into master

What does this MR do?

The easiest way is to explain this problem and fix on an example:

We have following items in epic tree:

  • 0 epic1
  • 1 epic2
  • 2 epic3
  • 3 epic4

When we move epic4 before epic2, oldIndex is 3, newIndex is 1, current item on index 1 is epic2 and the epic2 will be AFTER the epic1. This was working fine.

When we move epic1 before epic4, oldIndex is 0, newIndex is 2, current item on index 2 is epic3 and the epic3 will be BEFORE the epic1.

We have to distinguish this case and set before as relative position in this case.

Does this MR meet the acceptance criteria?

Conformity

Availability and Testing

Security

If this MR contains changes to processing or storing of credentials or tokens, authorization and authentication methods and other items described in the security review guidelines:

  • Label as security and @ mention @gitlab-com/gl-security/appsec
  • The MR includes necessary changes to maintain consistency between UI, API, email, or other methods
  • Security reports checked/validated by a reviewer from the AppSec team

Closes #35532 (closed)

Edited by 🤖 GitLab Bot 🤖

Merge request reports