Files
wekan/models/lib
Lauri Ojansivu b9edbcc858 Restore from Archive into a full list asks for another list, instead of doing nothing.
Restoring an archived card whose list had reached a hard WIP limit did
nothing at all: the Restore handlers checked canBeRestored() and, when it
said no, returned without a word or a method call, and Restore all
skipped such cards just as quietly.

- Restore, in the Archive sidebar and in an open archived card, now goes
  through one function (restoreArchivedCard): a list that is full - or
  gone - opens the restore-to-list popup, which says the list has reached
  its WIP limit and offers only lists with room; with none left it says
  so instead of offering a list that would fail again.
- Restore all restores every card that has room and then says how many
  it left out and why. Its popup opens against the link kept before the
  loop: after the awaits the browser has cleared evt.currentTarget.
- canBeRestored() decides with models/lib/wipRestore.js, which also
  blocks a list that is OVER its hard limit: the old `===` let a card
  into a list whose limit had been lowered below its count. A soft limit
  still only warns.

Tests: tests/wipRestore.test.cjs (the rule, over-limit and soft/disabled
negatives, both Restore paths, Restore all's count, and a scan that no
client code skips a blocked restore without a word);
restore-wip-limit.e2e.js against the production bundle (restore into
another list with the full one not offered, Restore all restoring what
has room and naming the rest, a soft limit restoring at once), 12 of 12
over three repeats with the existing archive restore test. The four new
strings are translated in every locale.

Thanks to jullbo and xet7 !

Fixes #6772.
2026-10-15 13:16:14 +03:00
..
2026-06-06 07:21:59 +03:00
2026-10-14 13:15:39 +03:00
2026-10-14 14:04:07 +03:00