Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 3a67332149 |
@@ -209,6 +209,25 @@ class QualKardHelper extends Base
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Surgically un-study ONE card that the user dropped back into Drafts: wipe its mastery to
|
||||||
|
* unread, clear the due date, and make it inert to RecoReco. Unlike resetCard() this does not
|
||||||
|
* move or re-arm the card (it is already in Drafts and already armed) -- a lighter, per-card
|
||||||
|
* counterpart to the board-wide Reset.
|
||||||
|
*
|
||||||
|
* The anchor is REMOVED, not saved as 0: Kanboard's metadata save drops the string "0" (empty()),
|
||||||
|
* which would leave the old positive anchor in place and let RecoReco pull the card back out of
|
||||||
|
* Drafts on the next cron. A removed key reads back as the default 0, so RecoReco skips it.
|
||||||
|
*
|
||||||
|
* @param int $task_id
|
||||||
|
*/
|
||||||
|
public function park($task_id)
|
||||||
|
{
|
||||||
|
$this->taskMetadataModel->save($task_id, array('qualkard_avg' => self::UNREAD)); // mastery -> new
|
||||||
|
$this->taskMetadataModel->remove($task_id, 'recoreco_anchor'); // -> inert
|
||||||
|
$this->db->table(TaskModel::TABLE)->eq('id', $task_id)->update(array('date_due' => 0));
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Grade a card by a score (a grade column's value): update the running average, compute the next
|
* Grade a card by a score (a grade column's value): update the running average, compute the next
|
||||||
* due date, and arm the anchor. RecoReco moves the card from here.
|
* due date, and arm the anchor. RecoReco moves the card from here.
|
||||||
|
|||||||
@@ -47,6 +47,11 @@ class Plugin extends Base
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Dropped back into Drafts -> surgically un-study this one card (new badge, no due, inert).
|
||||||
|
if ($dst === $helper->col($task['project_id'], 'draft')) {
|
||||||
|
$helper->park($task['id']);
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
// Mastery badge under the card title on the board, plus its stylesheet.
|
// Mastery badge under the card title on the board, plus its stylesheet.
|
||||||
@@ -81,7 +86,7 @@ class Plugin extends Base
|
|||||||
|
|
||||||
public function getPluginVersion()
|
public function getPluginVersion()
|
||||||
{
|
{
|
||||||
return '1.1.3';
|
return '1.1.4';
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getPluginHomepage()
|
public function getPluginHomepage()
|
||||||
|
|||||||
Reference in New Issue
Block a user