Added percent done to tasks (#102)
This commit is contained in:
parent
1e2ec17343
commit
1272255975
9 changed files with 132 additions and 30 deletions
|
@ -211,6 +211,7 @@ Sorry for some of them being in German, I'll tranlate them at some point.
|
||||||
* [x] Editable via task edit, like assignees
|
* [x] Editable via task edit, like assignees
|
||||||
* [x] "One endpoint to rule them all" -> Array-addable
|
* [x] "One endpoint to rule them all" -> Array-addable
|
||||||
* [x] Description should be longtext
|
* [x] Description should be longtext
|
||||||
|
* [x] Percent done - For now just a float, may later depend on how many sub tasks are done or so
|
||||||
* [ ] Attachments
|
* [ ] Attachments
|
||||||
* [ ] Related tasks -> settable with a "kind" of relation like blocked, subtask, or just related or so
|
* [ ] Related tasks -> settable with a "kind" of relation like blocked, subtask, or just related or so
|
||||||
* [ ] Should be possible to relate tasks which are not in the same list
|
* [ ] Should be possible to relate tasks which are not in the same list
|
||||||
|
@ -221,7 +222,6 @@ Sorry for some of them being in German, I'll tranlate them at some point.
|
||||||
* Relation Kinds (for now): Subtask/Parent Task (from subtask, no extra relation), Related, later also Blocked/Blocking
|
* Relation Kinds (for now): Subtask/Parent Task (from subtask, no extra relation), Related, later also Blocked/Blocking
|
||||||
* Should also be possible to create a new task with relations directly
|
* Should also be possible to create a new task with relations directly
|
||||||
* For everything else dedicated endpoints to manage relations
|
* For everything else dedicated endpoints to manage relations
|
||||||
* [ ] Percent done - For now just a float, may later depend on how many sub tasks are done or so
|
|
||||||
* [ ] Move tasks between lists
|
* [ ] Move tasks between lists
|
||||||
* [ ] "Status" field for things like "New", "In Progress", "Done", etc (customizable statuses)
|
* [ ] "Status" field for things like "New", "In Progress", "Done", etc (customizable statuses)
|
||||||
|
|
||||||
|
|
|
@ -80,33 +80,33 @@ func TestTask(t *testing.T) {
|
||||||
t.Run("by priority", func(t *testing.T) {
|
t.Run("by priority", func(t *testing.T) {
|
||||||
rec, err := testHandler.testReadAllWithUser(url.Values{"sort": []string{"priority"}}, nil)
|
rec, err := testHandler.testReadAllWithUser(url.Values{"sort": []string{"priority"}}, nil)
|
||||||
assert.NoError(t, err)
|
assert.NoError(t, err)
|
||||||
assert.Contains(t, rec.Body.String(), `[{"id":3,"text":"task #3 high prio","description":"","done":false,"doneAt":0,"dueDate":0,"reminderDates":null,"listID":1,"repeatAfter":0,"parentTaskID":0,"priority":100,"startDate":0,"endDate":0,"assignees":null,"labels":null,"hexColor":"","subtasks":null,"created":1543626724,"updated":1543626724,"createdBy":{"id":1,"username":"user1","avatarUrl":"111d68d06e2d317b5a59c2c6c5bad808","created":0,"updated":0}},{"id":4,"text":"task #4 low prio","description":"","done":false,"doneAt":0,"dueDate":0,"reminderDates":null,"listID":1,"repeatAfter":0,"parentTaskID":0,"priority":1`)
|
assert.Contains(t, rec.Body.String(), `[{"id":3,"text":"task #3 high prio","description":"","done":false,"doneAt":0,"dueDate":0,"reminderDates":null,"listID":1,"repeatAfter":0,"parentTaskID":0,"priority":100,"startDate":0,"endDate":0,"assignees":null,"labels":null,"hexColor":"","percentDone":0,"subtasks":null,"created":1543626724,"updated":1543626724,"createdBy":{"id":1,"username":"user1","avatarUrl":"111d68d06e2d317b5a59c2c6c5bad808","created":0,"updated":0}},{"id":4,"text":"task #4 low prio","description":"","done":false,"doneAt":0,"dueDate":0,"reminderDates":null,"listID":1,"repeatAfter":0,"parentTaskID":0,"priority":1`)
|
||||||
})
|
})
|
||||||
t.Run("by priority desc", func(t *testing.T) {
|
t.Run("by priority desc", func(t *testing.T) {
|
||||||
rec, err := testHandler.testReadAllWithUser(url.Values{"sort": []string{"prioritydesc"}}, nil)
|
rec, err := testHandler.testReadAllWithUser(url.Values{"sort": []string{"prioritydesc"}}, nil)
|
||||||
assert.NoError(t, err)
|
assert.NoError(t, err)
|
||||||
assert.Contains(t, rec.Body.String(), `[{"id":3,"text":"task #3 high prio","description":"","done":false,"doneAt":0,"dueDate":0,"reminderDates":null,"listID":1,"repeatAfter":0,"parentTaskID":0,"priority":100,"startDate":0,"endDate":0,"assignees":null,"labels":null,"hexColor":"","subtasks":null,"created":1543626724,"updated":1543626724,"createdBy":{"id":1,"username":"user1","avatarUrl":"111d68d06e2d317b5a59c2c6c5bad808","created":0,"updated":0}},{"id":4,"text":"task #4 low prio","description":"","done":false,"doneAt":0,"dueDate":0,"reminderDates":null,"listID":1,"repeatAfter":0,"parentTaskID":0,"priority":1`)
|
assert.Contains(t, rec.Body.String(), `[{"id":3,"text":"task #3 high prio","description":"","done":false,"doneAt":0,"dueDate":0,"reminderDates":null,"listID":1,"repeatAfter":0,"parentTaskID":0,"priority":100,"startDate":0,"endDate":0,"assignees":null,"labels":null,"hexColor":"","percentDone":0,"subtasks":null,"created":1543626724,"updated":1543626724,"createdBy":{"id":1,"username":"user1","avatarUrl":"111d68d06e2d317b5a59c2c6c5bad808","created":0,"updated":0}},{"id":4,"text":"task #4 low prio","description":"","done":false,"doneAt":0,"dueDate":0,"reminderDates":null,"listID":1,"repeatAfter":0,"parentTaskID":0,"priority":1`)
|
||||||
})
|
})
|
||||||
t.Run("by priority asc", func(t *testing.T) {
|
t.Run("by priority asc", func(t *testing.T) {
|
||||||
rec, err := testHandler.testReadAllWithUser(url.Values{"sort": []string{"priorityasc"}}, nil)
|
rec, err := testHandler.testReadAllWithUser(url.Values{"sort": []string{"priorityasc"}}, nil)
|
||||||
assert.NoError(t, err)
|
assert.NoError(t, err)
|
||||||
assert.Contains(t, rec.Body.String(), `{"id":32,"text":"task #32","description":"","done":false,"doneAt":0,"dueDate":0,"reminderDates":null,"listID":3,"repeatAfter":0,"parentTaskID":0,"priority":0,"startDate":0,"endDate":0,"assignees":null,"labels":null,"hexColor":"","subtasks":null,"created":1543626724,"updated":1543626724,"createdBy":{"id":1,"username":"user1","avatarUrl":"111d68d06e2d317b5a59c2c6c5bad808","created":0,"updated":0}},{"id":4,"text":"task #4 low prio","description":"","done":false,"doneAt":0,"dueDate":0,"reminderDates":null,"listID":1,"repeatAfter":0,"parentTaskID":0,"priority":1,"startDate":0,"endDate":0,"assignees":null,"labels":null,"hexColor":"","subtasks":null,"created":1543626724,"updated":1543626724,"createdBy":{"id":1,"username":"user1","avatarUrl":"111d68d06e2d317b5a59c2c6c5bad808","created":0,"updated":0}},{"id":3,"text":"task #3 high prio","description":"","done":false,"doneAt":0,"dueDate":0,"reminderDates":null,"listID":1,"repeatAfter":0,"parentTaskID":0,"priority":100,"startDate":0,"endDate":0,"assignees":null,"labels":null,"hexColor":"","subtasks":null,"created":1543626724,"updated":1543626724,"createdBy":{"id":1,"username":"user1","avatarUrl":"111d68d06e2d317b5a59c2c6c5bad808","created":0,"updated":0}}]`)
|
assert.Contains(t, rec.Body.String(), `{"id":33,"text":"task #33 with percent done","description":"","done":false,"doneAt":0,"dueDate":0,"reminderDates":null,"listID":1,"repeatAfter":0,"parentTaskID":0,"priority":0,"startDate":0,"endDate":0,"assignees":null,"labels":null,"hexColor":"","percentDone":0.5,"subtasks":null,"created":1543626724,"updated":1543626724,"createdBy":{"id":1,"username":"user1","avatarUrl":"111d68d06e2d317b5a59c2c6c5bad808","created":0,"updated":0}},{"id":4,"text":"task #4 low prio","description":"","done":false,"doneAt":0,"dueDate":0,"reminderDates":null,"listID":1,"repeatAfter":0,"parentTaskID":0,"priority":1,"startDate":0,"endDate":0,"assignees":null,"labels":null,"hexColor":"","percentDone":0,"subtasks":null,"created":1543626724,"updated":1543626724,"createdBy":{"id":1,"username":"user1","avatarUrl":"111d68d06e2d317b5a59c2c6c5bad808","created":0,"updated":0}},{"id":3,"text":"task #3 high prio","description":"","done":false,"doneAt":0,"dueDate":0,"reminderDates":null,"listID":1,"repeatAfter":0,"parentTaskID":0,"priority":100,"startDate":0,"endDate":0,"assignees":null,"labels":null,"hexColor":"","percentDone":0,"subtasks":null,"created":1543626724,"updated":1543626724,"createdBy":{"id":1,"username":"user1","avatarUrl":"111d68d06e2d317b5a59c2c6c5bad808","created":0,"updated":0}}]`)
|
||||||
})
|
})
|
||||||
// should equal duedate desc
|
// should equal duedate desc
|
||||||
t.Run("by duedate", func(t *testing.T) {
|
t.Run("by duedate", func(t *testing.T) {
|
||||||
rec, err := testHandler.testReadAllWithUser(url.Values{"sort": []string{"duedate"}}, nil)
|
rec, err := testHandler.testReadAllWithUser(url.Values{"sort": []string{"duedate"}}, nil)
|
||||||
assert.NoError(t, err)
|
assert.NoError(t, err)
|
||||||
assert.Contains(t, rec.Body.String(), `[{"id":5,"text":"task #5 higher due date","description":"","done":false,"doneAt":0,"dueDate":1543636724,"reminderDates":null,"listID":1,"repeatAfter":0,"parentTaskID":0,"priority":0,"startDate":0,"endDate":0,"assignees":null,"labels":null,"hexColor":"","subtasks":null,"created":1543626724,"updated":1543626724,"createdBy":{"id":1,"username":"user1","avatarUrl":"111d68d06e2d317b5a59c2c6c5bad808","created":0,"updated":0}},{"id":6,"text":"task #6 lower due date"`)
|
assert.Contains(t, rec.Body.String(), `[{"id":5,"text":"task #5 higher due date","description":"","done":false,"doneAt":0,"dueDate":1543636724,"reminderDates":null,"listID":1,"repeatAfter":0,"parentTaskID":0,"priority":0,"startDate":0,"endDate":0,"assignees":null,"labels":null,"hexColor":"","percentDone":0,"subtasks":null,"created":1543626724,"updated":1543626724,"createdBy":{"id":1,"username":"user1","avatarUrl":"111d68d06e2d317b5a59c2c6c5bad808","created":0,"updated":0}},{"id":6,"text":"task #6 lower due date"`)
|
||||||
})
|
})
|
||||||
t.Run("by duedate desc", func(t *testing.T) {
|
t.Run("by duedate desc", func(t *testing.T) {
|
||||||
rec, err := testHandler.testReadAllWithUser(url.Values{"sort": []string{"duedatedesc"}}, nil)
|
rec, err := testHandler.testReadAllWithUser(url.Values{"sort": []string{"duedatedesc"}}, nil)
|
||||||
assert.NoError(t, err)
|
assert.NoError(t, err)
|
||||||
assert.Contains(t, rec.Body.String(), `[{"id":5,"text":"task #5 higher due date","description":"","done":false,"doneAt":0,"dueDate":1543636724,"reminderDates":null,"listID":1,"repeatAfter":0,"parentTaskID":0,"priority":0,"startDate":0,"endDate":0,"assignees":null,"labels":null,"hexColor":"","subtasks":null,"created":1543626724,"updated":1543626724,"createdBy":{"id":1,"username":"user1","avatarUrl":"111d68d06e2d317b5a59c2c6c5bad808","created":0,"updated":0}},{"id":6,"text":"task #6 lower due date"`)
|
assert.Contains(t, rec.Body.String(), `[{"id":5,"text":"task #5 higher due date","description":"","done":false,"doneAt":0,"dueDate":1543636724,"reminderDates":null,"listID":1,"repeatAfter":0,"parentTaskID":0,"priority":0,"startDate":0,"endDate":0,"assignees":null,"labels":null,"hexColor":"","percentDone":0,"subtasks":null,"created":1543626724,"updated":1543626724,"createdBy":{"id":1,"username":"user1","avatarUrl":"111d68d06e2d317b5a59c2c6c5bad808","created":0,"updated":0}},{"id":6,"text":"task #6 lower due date"`)
|
||||||
})
|
})
|
||||||
t.Run("by duedate asc", func(t *testing.T) {
|
t.Run("by duedate asc", func(t *testing.T) {
|
||||||
rec, err := testHandler.testReadAllWithUser(url.Values{"sort": []string{"duedateasc"}}, nil)
|
rec, err := testHandler.testReadAllWithUser(url.Values{"sort": []string{"duedateasc"}}, nil)
|
||||||
assert.NoError(t, err)
|
assert.NoError(t, err)
|
||||||
assert.Contains(t, rec.Body.String(), `{"id":6,"text":"task #6 lower due date","description":"","done":false,"doneAt":0,"dueDate":1543616724,"reminderDates":null,"listID":1,"repeatAfter":0,"parentTaskID":0,"priority":0,"startDate":0,"endDate":0,"assignees":null,"labels":null,"hexColor":"","subtasks":null,"created":1543626724,"updated":1543626724,"createdBy":{"id":1,"username":"user1","avatarUrl":"111d68d06e2d317b5a59c2c6c5bad808","created":0,"updated":0}},{"id":5,"text":"task #5 higher due date","description":"","done":false,"doneAt":0,"dueDate":1543636724,"reminderDates":null,"listID":1,"repeatAfter":0,"parentTaskID":0,"priority":0,"startDate":0,"endDate":0,"assignees":null,"labels":null,"hexColor":"","subtasks":null,"created":1543626724,"updated":1543626724,"createdBy":{"id":1,"username":"user1","avatarUrl":"111d68d06e2d317b5a59c2c6c5bad808","created":0,"updated":0}}]`)
|
assert.Contains(t, rec.Body.String(), `{"id":6,"text":"task #6 lower due date","description":"","done":false,"doneAt":0,"dueDate":1543616724,"reminderDates":null,"listID":1,"repeatAfter":0,"parentTaskID":0,"priority":0,"startDate":0,"endDate":0,"assignees":null,"labels":null,"hexColor":"","percentDone":0,"subtasks":null,"created":1543626724,"updated":1543626724,"createdBy":{"id":1,"username":"user1","avatarUrl":"111d68d06e2d317b5a59c2c6c5bad808","created":0,"updated":0}},{"id":5,"text":"task #5 higher due date","description":"","done":false,"doneAt":0,"dueDate":1543636724,"reminderDates":null,"listID":1,"repeatAfter":0,"parentTaskID":0,"priority":0,"startDate":0,"endDate":0,"assignees":null,"labels":null,"hexColor":"","percentDone":0,"subtasks":null,"created":1543626724,"updated":1543626724,"createdBy":{"id":1,"username":"user1","avatarUrl":"111d68d06e2d317b5a59c2c6c5bad808","created":0,"updated":0}}]`)
|
||||||
})
|
})
|
||||||
t.Run("invalid parameter", func(t *testing.T) {
|
t.Run("invalid parameter", func(t *testing.T) {
|
||||||
// Invalid parameter should not sort at all
|
// Invalid parameter should not sort at all
|
||||||
|
@ -328,6 +328,18 @@ func TestTask(t *testing.T) {
|
||||||
assert.Contains(t, rec.Body.String(), `"hexColor":""`)
|
assert.Contains(t, rec.Body.String(), `"hexColor":""`)
|
||||||
assert.NotContains(t, rec.Body.String(), `"hexColor":"f0f0f0"`)
|
assert.NotContains(t, rec.Body.String(), `"hexColor":"f0f0f0"`)
|
||||||
})
|
})
|
||||||
|
t.Run("Percent Done", func(t *testing.T) {
|
||||||
|
rec, err := testHandler.testUpdateWithUser(nil, map[string]string{"listtask": "1"}, `{"percentDone":0.1}`)
|
||||||
|
assert.NoError(t, err)
|
||||||
|
assert.Contains(t, rec.Body.String(), `"percentDone":0.1`)
|
||||||
|
assert.NotContains(t, rec.Body.String(), `"percentDone":0,`)
|
||||||
|
})
|
||||||
|
t.Run("Percent Done unset", func(t *testing.T) {
|
||||||
|
rec, err := testHandler.testUpdateWithUser(nil, map[string]string{"listtask": "33"}, `{"percentDone":0}`)
|
||||||
|
assert.NoError(t, err)
|
||||||
|
assert.Contains(t, rec.Body.String(), `"percentDone":0,`)
|
||||||
|
assert.NotContains(t, rec.Body.String(), `"percentDone":0.1`)
|
||||||
|
})
|
||||||
})
|
})
|
||||||
|
|
||||||
t.Run("Nonexisting", func(t *testing.T) {
|
t.Run("Nonexisting", func(t *testing.T) {
|
||||||
|
|
44
pkg/migration/20190920185205.go
Normal file
44
pkg/migration/20190920185205.go
Normal file
|
@ -0,0 +1,44 @@
|
||||||
|
// Copyright 2019 Vikunja and contriubtors. All rights reserved.
|
||||||
|
//
|
||||||
|
// This file is part of Vikunja.
|
||||||
|
//
|
||||||
|
// Vikunja is free software: you can redistribute it and/or modify
|
||||||
|
// it under the terms of the GNU General Public License as published by
|
||||||
|
// the Free Software Foundation, either version 3 of the License, or
|
||||||
|
// (at your option) any later version.
|
||||||
|
//
|
||||||
|
// Vikunja is distributed in the hope that it will be useful,
|
||||||
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
// GNU General Public License for more details.
|
||||||
|
//
|
||||||
|
// You should have received a copy of the GNU General Public License
|
||||||
|
// along with Vikunja. If not, see <https://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
package migration
|
||||||
|
|
||||||
|
import (
|
||||||
|
"github.com/go-xorm/xorm"
|
||||||
|
"src.techknowlogick.com/xormigrate"
|
||||||
|
)
|
||||||
|
|
||||||
|
type task20190920185205 struct {
|
||||||
|
PercentDone float64 `xorm:"DOUBLE null" json:"percentDone"`
|
||||||
|
}
|
||||||
|
|
||||||
|
func (task20190920185205) TableName() string {
|
||||||
|
return "tasks"
|
||||||
|
}
|
||||||
|
|
||||||
|
func init() {
|
||||||
|
migrations = append(migrations, &xormigrate.Migration{
|
||||||
|
ID: "20190920185205",
|
||||||
|
Description: "Add task percent done",
|
||||||
|
Migrate: func(tx *xorm.Engine) error {
|
||||||
|
return tx.Sync2(task20190920185205{})
|
||||||
|
},
|
||||||
|
Rollback: func(tx *xorm.Engine) error {
|
||||||
|
return dropTableColum(tx, "tasks", "percent_done")
|
||||||
|
},
|
||||||
|
})
|
||||||
|
}
|
|
@ -204,4 +204,11 @@
|
||||||
list_id: 3
|
list_id: 3
|
||||||
created: 1543626724
|
created: 1543626724
|
||||||
updated: 1543626724
|
updated: 1543626724
|
||||||
|
- id: 33
|
||||||
|
text: 'task #33 with percent done'
|
||||||
|
created_by_id: 1
|
||||||
|
list_id: 1
|
||||||
|
percent_done: 0.5
|
||||||
|
created: 1543626724
|
||||||
|
updated: 1543626724
|
||||||
|
|
||||||
|
|
|
@ -336,6 +336,16 @@ func sortTasksForTesting(by SortBy) (tasks []*Task) {
|
||||||
Created: 1543626724,
|
Created: 1543626724,
|
||||||
Updated: 1543626724,
|
Updated: 1543626724,
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
ID: 33,
|
||||||
|
Text: "task #33 with percent done",
|
||||||
|
CreatedByID: 1,
|
||||||
|
CreatedBy: user1,
|
||||||
|
ListID: 1,
|
||||||
|
PercentDone: 0.5,
|
||||||
|
Created: 1543626724,
|
||||||
|
Updated: 1543626724,
|
||||||
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
switch by {
|
switch by {
|
||||||
|
|
|
@ -60,6 +60,8 @@ type Task struct {
|
||||||
Labels []*Label `xorm:"-" json:"labels"`
|
Labels []*Label `xorm:"-" json:"labels"`
|
||||||
// The task color in hex
|
// The task color in hex
|
||||||
HexColor string `xorm:"varchar(6) null" json:"hexColor" valid:"runelength(0|6)" maxLength:"6"`
|
HexColor string `xorm:"varchar(6) null" json:"hexColor" valid:"runelength(0|6)" maxLength:"6"`
|
||||||
|
// Determines how far a task is left from being done
|
||||||
|
PercentDone float64 `xorm:"DOUBLE null" json:"percentDone"`
|
||||||
|
|
||||||
// The UID is currently not used for anything other than caldav, which is why we don't expose it over json
|
// The UID is currently not used for anything other than caldav, which is why we don't expose it over json
|
||||||
UID string `xorm:"varchar(250) null" json:"-"`
|
UID string `xorm:"varchar(250) null" json:"-"`
|
||||||
|
@ -632,6 +634,10 @@ func (t *Task) Update() (err error) {
|
||||||
if t.HexColor == "" {
|
if t.HexColor == "" {
|
||||||
ot.HexColor = ""
|
ot.HexColor = ""
|
||||||
}
|
}
|
||||||
|
// Percent DOnw
|
||||||
|
if t.PercentDone == 0 {
|
||||||
|
ot.PercentDone = 0
|
||||||
|
}
|
||||||
|
|
||||||
_, err = x.ID(t.ID).
|
_, err = x.ID(t.ID).
|
||||||
Cols("text",
|
Cols("text",
|
||||||
|
@ -644,7 +650,8 @@ func (t *Task) Update() (err error) {
|
||||||
"start_date_unix",
|
"start_date_unix",
|
||||||
"end_date_unix",
|
"end_date_unix",
|
||||||
"hex_color",
|
"hex_color",
|
||||||
"done_at_unix").
|
"done_at_unix",
|
||||||
|
"percent_done").
|
||||||
Update(ot)
|
Update(ot)
|
||||||
*t = ot
|
*t = ot
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
// GENERATED BY THE COMMAND ABOVE; DO NOT EDIT
|
// GENERATED BY THE COMMAND ABOVE; DO NOT EDIT
|
||||||
// This file was generated by swaggo/swag at
|
// This file was generated by swaggo/swag at
|
||||||
// 2019-09-20 17:41:39.321673846 +0200 CEST m=+0.137010842
|
// 2019-09-20 19:04:01.162535903 +0200 CEST m=+0.097033344
|
||||||
|
|
||||||
package swagger
|
package swagger
|
||||||
|
|
||||||
|
@ -412,7 +412,7 @@ var doc = `{
|
||||||
"JWTKeyAuth": []
|
"JWTKeyAuth": []
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"description": "Returns a list by its ID.",
|
"description": "Returns a team by its ID.",
|
||||||
"consumes": [
|
"consumes": [
|
||||||
"application/json"
|
"application/json"
|
||||||
],
|
],
|
||||||
|
@ -420,13 +420,13 @@ var doc = `{
|
||||||
"application/json"
|
"application/json"
|
||||||
],
|
],
|
||||||
"tags": [
|
"tags": [
|
||||||
"list"
|
"team"
|
||||||
],
|
],
|
||||||
"summary": "Gets one list",
|
"summary": "Gets one team",
|
||||||
"parameters": [
|
"parameters": [
|
||||||
{
|
{
|
||||||
"type": "integer",
|
"type": "integer",
|
||||||
"description": "List ID",
|
"description": "Team ID",
|
||||||
"name": "id",
|
"name": "id",
|
||||||
"in": "path",
|
"in": "path",
|
||||||
"required": true
|
"required": true
|
||||||
|
@ -434,14 +434,14 @@ var doc = `{
|
||||||
],
|
],
|
||||||
"responses": {
|
"responses": {
|
||||||
"200": {
|
"200": {
|
||||||
"description": "The list",
|
"description": "The team",
|
||||||
"schema": {
|
"schema": {
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"$ref": "#/definitions/models.List"
|
"$ref": "#/definitions/models.Team"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"403": {
|
"403": {
|
||||||
"description": "The user does not have access to the list",
|
"description": "The user does not have access to the team",
|
||||||
"schema": {
|
"schema": {
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"$ref": "#/definitions/code.vikunja.io.web.HTTPError"
|
"$ref": "#/definitions/code.vikunja.io.web.HTTPError"
|
||||||
|
@ -4147,6 +4147,10 @@ var doc = `{
|
||||||
"description": "If the task is a subtask, this is the id of its parent.",
|
"description": "If the task is a subtask, this is the id of its parent.",
|
||||||
"type": "integer"
|
"type": "integer"
|
||||||
},
|
},
|
||||||
|
"percentDone": {
|
||||||
|
"description": "Determines how far a task is left from being done",
|
||||||
|
"type": "number"
|
||||||
|
},
|
||||||
"priority": {
|
"priority": {
|
||||||
"description": "The task priority. Can be anything you want, it is possible to sort by this later.",
|
"description": "The task priority. Can be anything you want, it is possible to sort by this later.",
|
||||||
"type": "integer"
|
"type": "integer"
|
||||||
|
@ -4558,6 +4562,10 @@ var doc = `{
|
||||||
"description": "If the task is a subtask, this is the id of its parent.",
|
"description": "If the task is a subtask, this is the id of its parent.",
|
||||||
"type": "integer"
|
"type": "integer"
|
||||||
},
|
},
|
||||||
|
"percentDone": {
|
||||||
|
"description": "Determines how far a task is left from being done",
|
||||||
|
"type": "number"
|
||||||
|
},
|
||||||
"priority": {
|
"priority": {
|
||||||
"description": "The task priority. Can be anything you want, it is possible to sort by this later.",
|
"description": "The task priority. Can be anything you want, it is possible to sort by this later.",
|
||||||
"type": "integer"
|
"type": "integer"
|
||||||
|
|
|
@ -399,7 +399,7 @@
|
||||||
"JWTKeyAuth": []
|
"JWTKeyAuth": []
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"description": "Returns a list by its ID.",
|
"description": "Returns a team by its ID.",
|
||||||
"consumes": [
|
"consumes": [
|
||||||
"application/json"
|
"application/json"
|
||||||
],
|
],
|
||||||
|
@ -407,13 +407,13 @@
|
||||||
"application/json"
|
"application/json"
|
||||||
],
|
],
|
||||||
"tags": [
|
"tags": [
|
||||||
"list"
|
"team"
|
||||||
],
|
],
|
||||||
"summary": "Gets one list",
|
"summary": "Gets one team",
|
||||||
"parameters": [
|
"parameters": [
|
||||||
{
|
{
|
||||||
"type": "integer",
|
"type": "integer",
|
||||||
"description": "List ID",
|
"description": "Team ID",
|
||||||
"name": "id",
|
"name": "id",
|
||||||
"in": "path",
|
"in": "path",
|
||||||
"required": true
|
"required": true
|
||||||
|
@ -421,14 +421,14 @@
|
||||||
],
|
],
|
||||||
"responses": {
|
"responses": {
|
||||||
"200": {
|
"200": {
|
||||||
"description": "The list",
|
"description": "The team",
|
||||||
"schema": {
|
"schema": {
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"$ref": "#/definitions/models.List"
|
"$ref": "#/definitions/models.Team"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"403": {
|
"403": {
|
||||||
"description": "The user does not have access to the list",
|
"description": "The user does not have access to the team",
|
||||||
"schema": {
|
"schema": {
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"$ref": "#/definitions/code.vikunja.io/web.HTTPError"
|
"$ref": "#/definitions/code.vikunja.io/web.HTTPError"
|
||||||
|
@ -4133,6 +4133,10 @@
|
||||||
"description": "If the task is a subtask, this is the id of its parent.",
|
"description": "If the task is a subtask, this is the id of its parent.",
|
||||||
"type": "integer"
|
"type": "integer"
|
||||||
},
|
},
|
||||||
|
"percentDone": {
|
||||||
|
"description": "Determines how far a task is left from being done",
|
||||||
|
"type": "number"
|
||||||
|
},
|
||||||
"priority": {
|
"priority": {
|
||||||
"description": "The task priority. Can be anything you want, it is possible to sort by this later.",
|
"description": "The task priority. Can be anything you want, it is possible to sort by this later.",
|
||||||
"type": "integer"
|
"type": "integer"
|
||||||
|
@ -4544,6 +4548,10 @@
|
||||||
"description": "If the task is a subtask, this is the id of its parent.",
|
"description": "If the task is a subtask, this is the id of its parent.",
|
||||||
"type": "integer"
|
"type": "integer"
|
||||||
},
|
},
|
||||||
|
"percentDone": {
|
||||||
|
"description": "Determines how far a task is left from being done",
|
||||||
|
"type": "number"
|
||||||
|
},
|
||||||
"priority": {
|
"priority": {
|
||||||
"description": "The task priority. Can be anything you want, it is possible to sort by this later.",
|
"description": "The task priority. Can be anything you want, it is possible to sort by this later.",
|
||||||
"type": "integer"
|
"type": "integer"
|
||||||
|
|
|
@ -77,6 +77,9 @@ definitions:
|
||||||
parentTaskID:
|
parentTaskID:
|
||||||
description: If the task is a subtask, this is the id of its parent.
|
description: If the task is a subtask, this is the id of its parent.
|
||||||
type: integer
|
type: integer
|
||||||
|
percentDone:
|
||||||
|
description: Determines how far a task is left from being done
|
||||||
|
type: number
|
||||||
priority:
|
priority:
|
||||||
description: The task priority. Can be anything you want, it is possible to
|
description: The task priority. Can be anything you want, it is possible to
|
||||||
sort by this later.
|
sort by this later.
|
||||||
|
@ -405,6 +408,9 @@ definitions:
|
||||||
parentTaskID:
|
parentTaskID:
|
||||||
description: If the task is a subtask, this is the id of its parent.
|
description: If the task is a subtask, this is the id of its parent.
|
||||||
type: integer
|
type: integer
|
||||||
|
percentDone:
|
||||||
|
description: Determines how far a task is left from being done
|
||||||
|
type: number
|
||||||
priority:
|
priority:
|
||||||
description: The task priority. Can be anything you want, it is possible to
|
description: The task priority. Can be anything you want, it is possible to
|
||||||
sort by this later.
|
sort by this later.
|
||||||
|
@ -1004,9 +1010,9 @@ paths:
|
||||||
get:
|
get:
|
||||||
consumes:
|
consumes:
|
||||||
- application/json
|
- application/json
|
||||||
description: Returns a list by its ID.
|
description: Returns a team by its ID.
|
||||||
parameters:
|
parameters:
|
||||||
- description: List ID
|
- description: Team ID
|
||||||
in: path
|
in: path
|
||||||
name: id
|
name: id
|
||||||
required: true
|
required: true
|
||||||
|
@ -1015,12 +1021,12 @@ paths:
|
||||||
- application/json
|
- application/json
|
||||||
responses:
|
responses:
|
||||||
"200":
|
"200":
|
||||||
description: The list
|
description: The team
|
||||||
schema:
|
schema:
|
||||||
$ref: '#/definitions/models.List'
|
$ref: '#/definitions/models.Team'
|
||||||
type: object
|
type: object
|
||||||
"403":
|
"403":
|
||||||
description: The user does not have access to the list
|
description: The user does not have access to the team
|
||||||
schema:
|
schema:
|
||||||
$ref: '#/definitions/code.vikunja.io/web.HTTPError'
|
$ref: '#/definitions/code.vikunja.io/web.HTTPError'
|
||||||
type: object
|
type: object
|
||||||
|
@ -1031,9 +1037,9 @@ paths:
|
||||||
type: object
|
type: object
|
||||||
security:
|
security:
|
||||||
- JWTKeyAuth: []
|
- JWTKeyAuth: []
|
||||||
summary: Gets one list
|
summary: Gets one team
|
||||||
tags:
|
tags:
|
||||||
- list
|
- team
|
||||||
post:
|
post:
|
||||||
consumes:
|
consumes:
|
||||||
- application/json
|
- application/json
|
||||||
|
|
Loading…
Add table
Reference in a new issue