mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-17 14:47:53 +01:00
Added support for grouping tasks by challenge (#8469)
* Added support for grouping tasks by chllenge * Fixed tests and updated default challenge model name * Fixed broken member test * Updated setting string * Changed to shortName * Began abstracting task grouping * Added initial task directive code * Added new directives to help with grouping of tasks * Removed random console.log
This commit is contained in:
@@ -58,6 +58,7 @@ export let TaskSchema = new Schema({
|
||||
userId: {type: String, ref: 'User', validate: [validator.isUUID, 'Invalid uuid.']}, // When not set it belongs to a challenge
|
||||
|
||||
challenge: {
|
||||
shortName: {type: String, default: 'None'},
|
||||
id: {type: String, ref: 'Challenge', validate: [validator.isUUID, 'Invalid uuid.']}, // When set (and userId not set) it's the original task
|
||||
taskId: {type: String, ref: 'Task', validate: [validator.isUUID, 'Invalid uuid.']}, // When not set but challenge.id defined it's the original task
|
||||
broken: {type: String, enum: ['CHALLENGE_DELETED', 'TASK_DELETED', 'UNSUBSCRIBED', 'CHALLENGE_CLOSED', 'CHALLENGE_TASK_NOT_FOUND']}, // CHALLENGE_TASK_NOT_FOUND comes from v3 migration
|
||||
|
||||
Reference in New Issue
Block a user