# Code maintenance AGILE-370 - Migrate Backlogs move_after onto Lists::MoveAfterAnchor

Project: Stream agile
Status: new
URL: https://community.openproject.org/work_packages/AGILE-370

## OPEN POINTS

_No work packages_

## Subtasks

_No work packages_

## Details

| Attribute | Value |
| --- | --- |
| Assignee |  |
| Accountable |  |
| Designer |  |
| Developers | OP Dev Polaris Team |
| Requires doc change | No |
| Date |  |
| Priority | Medium |
| Target versions |  |
| Sprint |  |
| Backlog bucket |  |
| Module |  |
| Accessibility | No |
| List |  |
| Labels |  |

## Estimates and progress

| Attribute | Value |
| --- | --- |
| Work |  |
| Remaining work |  |

## Description

## Context

https://community.openproject.org/wp/DREAM-786 (https://github.com/opf/openproject/pull/24504) introduced `Lists::MoveAfterAnchor`, an anchor-based (`prev_id`) reordering concern for `acts_as_list` models with strict semantics: a blank anchor moves the record to the top; an unknown, out-of-scope, or self anchor is rejected with no mutation (422 at the endpoints).

Backlogs still carries its own older `move_after` (`modules/backlogs/lib/open_project/backlogs/list.rb`), which mutates first (`remove_from_list`) and silently treats an unknown `prev_id` as move-to-top. It also supports the legacy `position:` param and is coupled to the Backlogs list concern (acts_as_list scopes, `update_columns` position override).

Review discussion that motivated this ticket: https://github.com/opf/openproject/pull/24504#discussion_r3728491012

## Goal

Make `Lists::MoveAfterAnchor` the canonical anchor-reorder concern by migrating Backlogs onto it and removing the duplicate implementation.

## Notes

- Reevaluate the lenient unknown-anchor fallback: silently moving to top can mask stale or raced anchors sent by the frontend; decide whether Backlogs should adopt the strict reject-without-mutation semantics.
- Decide the fate of the legacy `position:` param support (check for remaining senders first).
- The Backlogs concern overrides `set_list_position` to use `update_columns` so `saved_changes` survives; verify how that composes with the shared concern.
