Change $type of date for todos (#12779)

* change $type to date for task and add new test

* adjust apidocs to reflect type change

* migration test for api date $type change

* minor fixes to migration

* unset instead of set empty string

* add type filter

* fix(todo date migration): make sure the update command works and limit update ops

Co-authored-by: Matteo Pagliazzi <matteopagliazzi@gmail.com>
This commit is contained in:
Shadow
2020-12-24 11:37:09 -06:00
committed by GitHub
parent 2c44f766cd
commit 7c0b3612f0
4 changed files with 77 additions and 5 deletions

View File

@@ -80,7 +80,7 @@ const requiredGroupFields = '_id leader tasksOrder name';
* "per", "con"
* @apiParam (Body) {Boolean} [collapseChecklist=false] Determines if a checklist will be displayed
* @apiParam (Body) {String} [notes] Extra notes
* @apiParam (Body) {String} [date] Due date to be shown in task list. Only valid for type "todo."
* @apiParam (Body) {Date} [date] Due date to be shown in task list. Only valid for type "todo."
* @apiParam (Body) {Number="0.1","1","1.5","2"} [priority=1] Difficulty, options are 0.1, 1,
* 1.5, 2; eqivalent of Trivial,
* Easy, Medium, Hard.
@@ -253,7 +253,7 @@ api.createUserTasks = {
* "int", "per", "con".
* @apiParam (Body) {Boolean} [collapseChecklist=false] Determines if a checklist will be displayed
* @apiParam (Body) {String} [notes] Extra notes
* @apiParam (Body) {String} [date] Due date to be shown in task list. Only valid for type "todo."
* @apiParam (Body) {Date} [date] Due date to be shown in task list. Only valid for type "todo."
* @apiParam (Body) {Number="0.1","1","1.5","2"} [priority=1] Difficulty, options are 0.1, 1,
* 1.5, 2; eqivalent of Trivial,
* Easy, Medium, Hard.
@@ -567,7 +567,7 @@ api.getTask = {
* "per", "con".
* @apiParam (Body) {Boolean} [collapseChecklist=false] Determines if a checklist will be displayed
* @apiParam (Body) {String} [notes] Extra notes
* @apiParam (Body) {String} [date] Due date to be shown in task list. Only valid for type "todo."
* @apiParam (Body) {Date} [date] Due date to be shown in task list. Only valid for type "todo."
* @apiParam (Body) {Number="0.1","1","1.5","2"} [priority=1] Difficulty, options are 0.1, 1,
* 1.5, 2; eqivalent of Trivial,
* Easy, Medium, Hard.