fix(todos): add dateCompleted to todos so they're archived 3 days after
completion, not 3 days after creation. Fixes #2478
This commit is contained in:
+2
-1
@@ -15,7 +15,7 @@ var _ = require('lodash');
|
||||
var TaskSchema = {
|
||||
//_id:{type: String,'default': helpers.uuid},
|
||||
id: {type: String,'default': shared.uuid},
|
||||
created: {type:Date, 'default':new Date},
|
||||
dateCreated: {type:Date, 'default':Date.now},
|
||||
text: String,
|
||||
notes: {type: String, 'default': ''},
|
||||
tags: {type: Schema.Types.Mixed, 'default': {}}, //{ "4ddf03d9-54bd-41a3-b011-ca1f1d2e9371" : true },
|
||||
@@ -73,6 +73,7 @@ var TodoSchema = new Schema(
|
||||
_.defaults({
|
||||
type: {type:String, 'default': 'todo'},
|
||||
completed: {type: Boolean, 'default': false},
|
||||
dateCompleted: Date,
|
||||
date: String, // due date for todos // FIXME we're getting parse errors, people have stored as "today" and "3/13". Need to run a migration & put this back to type: Date
|
||||
collapseChecklist:collapseChecklist,
|
||||
checklist:checklist
|
||||
|
||||
Reference in New Issue
Block a user