Skip to content

[AGILE-358] Work packages are shuffled when dragging a work package to it's original position - #24503

Open
dombesz wants to merge 1 commit into
release/17.7from
bug/agile-358-work-packages-are-shuffled-when-dragging-a-work-package-to-it-s-original-position
Open

[AGILE-358] Work packages are shuffled when dragging a work package to it's original position#24503
dombesz wants to merge 1 commit into
release/17.7from
bug/agile-358-work-packages-are-shuffled-when-dragging-a-work-package-to-it-s-original-position

Conversation

@dombesz

@dombesz dombesz commented Jul 29, 2026

Copy link
Copy Markdown
Contributor

Ticket

https://community.openproject.org/wp/AGILE-358

What are you trying to accomplish?

Do not move the dragged work package if the drag operation is a no-op, meaning, the element was dropped back to its original position.

Screenshots

What approach did you choose and why?

  • Update the resolveDropIntent method to ignore any drop actions when the source element lands its original location.
  • Use nextElementSibling in the list-dom.ts in order to avoid matching text nodes.

Merge checklist

  • Added/updated tests
  • Added/updated documentation in Lookbook (patterns, previews, etc)
  • Tested major browsers (Chrome, Firefox, Edge, ...)

@dombesz
dombesz force-pushed the bug/agile-358-work-packages-are-shuffled-when-dragging-a-work-package-to-it-s-original-position branch from 7189ba2 to f5e0a03 Compare July 29, 2026 17:13
row:HTMLElement;
parent:Node|null;
nextSibling:Node|null;
nextElementSibling:Node|null;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why this rename?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nextSibling also includes text nodes, even comments <-- This is a comment -->, so it's not a reliable way to detect the sibling element.

@dombesz
dombesz force-pushed the bug/agile-358-work-packages-are-shuffled-when-dragging-a-work-package-to-it-s-original-position branch 3 times, most recently from a223780 to 9bccfc0 Compare July 29, 2026 22:02
@github-actions

Copy link
Copy Markdown

Warning

Flaky specs

  • rspec ./modules/wikis/spec/features/admin/internal_provider_spec.rb[1:1]
🤖 Ask Copilot to investigate

Copy the prompt below into a new comment on this PR to delegate the investigation to GitHub Copilot. It will look into the flakiness and open a separate pull request with you as reviewer.

@copilot The following spec(s) are flaky in CI (first seen on PR #24503, linked for reference only):

- `rspec ./modules/wikis/spec/features/admin/internal_provider_spec.rb[1:1]`

Treat this as a standalone task, unrelated to PR #24503. Create a new branch from origin/dev and open a new pull request targeting dev — do not stack it on PR #24503 or reuse that branch.

Follow the playbook in docs/development/testing/handling-flaky-tests/README.md to find the root cause and fix the underlying race — do not skip, delete, or weaken the spec to make it pass; disabling is a last resort per the playbook, and only with a bug ticket. Verify the fix by running the spec(s) repeatedly (e.g. `script/bulk_run_rspec --run-count 10`).

If you cannot reproduce the flake or are not confident in a fix after reasonable investigation, do not fabricate a change or skip the spec to force CI green. Instead, leave the pull request in draft and document what you tried, the suspected cause, and any leads in its description, then assign @dombesz to take over.

Once the fix is verified, title the PR after the spec(s) it fixes, and use the PR description to explain the root cause, how the change resolves it, and the before/after results. Label the PR `flaky-spec`, assign @dombesz, and request a review from @dombesz.
On every commit, set @dombesz as the sole co-author with a `Co-authored-by:` trailer (use their GitHub no-reply email so it links to their account), so it is traceable who dispatched the fix.

@dombesz
dombesz force-pushed the bug/agile-358-work-packages-are-shuffled-when-dragging-a-work-package-to-it-s-original-position branch 2 times, most recently from fef70f2 to a0d3080 Compare July 30, 2026 12:10
@dombesz
dombesz force-pushed the bug/agile-358-work-packages-are-shuffled-when-dragging-a-work-package-to-it-s-original-position branch from a0d3080 to d59b844 Compare July 30, 2026 12:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants