reconcile duplicate links retroactively with the setting (v0.3.2)

This commit is contained in:
2026-07-07 23:11:08 -03:00
parent d0d32db177
commit 1fa3acae74
4 changed files with 38 additions and 14 deletions

View File

@@ -62,6 +62,12 @@ class RecurrenceController extends BaseController
}
$this->taskMetadataModel->save($task['id'], $values);
// Reconcile the template's duplicate links with the setting right away (removes existing
// links to its RecoReco clones when the option is off).
$model = new \Kanboard\Plugin\RecoReco\Model\RecoRecoModel($this->container);
$model->syncCloneLinks($task['id'], $values['recoreco_link_copies'] == 1);
$this->flash->success(t('Recurring schedule saved.'));
return $this->response->redirect($this->helper->url->to('TaskViewController', 'show', array('task_id' => $task['id'])), true);