1
0

Add real buckets for tasks which don't have one (#446)

Add docs for error code

Add moving new tasks into the default bucket when none was provided

Add moving tasks in default bucket when deleting one

Fix tests again

Add test for removing a bucket

Fix tests

Prevent removing the last bucket

Remove the empty pseudo bucket

Add migration to create a new bucket for each list (and put all tasks in it

Co-authored-by: kolaente <k@knt.li>
Reviewed-on: https://kolaente.dev/vikunja/api/pulls/446
This commit is contained in:
konrad
2020-04-25 20:32:02 +00:00
parent 2b1fc441e6
commit 231dc3913f
12 changed files with 364 additions and 58 deletions

View File

@ -101,3 +101,107 @@
created_by_id: 1
created: 1587244432
updated: 1587244432
- id: 18
title: testbucket18
list_id: 5
created_by_id: 1
created: 1587244432
updated: 1587244432
- id: 19
title: testbucket19
list_id: 21
created_by_id: 1
created: 1587244432
updated: 1587244432
- id: 20
title: testbucket20
list_id: 22
created_by_id: 1
created: 1587244432
updated: 1587244432
- id: 21
title: testbucket21
list_id: 3
created_by_id: 1
created: 1587244432
updated: 1587244432
# Duplicate buckets to make deletion of one of them possible
- id: 22
title: testbucket22
list_id: 6
created_by_id: 1
created: 1587244432
updated: 1587244432
- id: 23
title: testbucket23
list_id: 7
created_by_id: 1
created: 1587244432
updated: 1587244432
- id: 24
title: testbucket24
list_id: 8
created_by_id: 1
created: 1587244432
updated: 1587244432
- id: 25
title: testbucket25
list_id: 9
created_by_id: 1
created: 1587244432
updated: 1587244432
- id: 26
title: testbucket26
list_id: 10
created_by_id: 1
created: 1587244432
updated: 1587244432
- id: 27
title: testbucket27
list_id: 11
created_by_id: 1
created: 1587244432
updated: 1587244432
- id: 28
title: testbucket28
list_id: 12
created_by_id: 1
created: 1587244432
updated: 1587244432
- id: 29
title: testbucket29
list_id: 13
created_by_id: 1
created: 1587244432
updated: 1587244432
- id: 30
title: testbucket30
list_id: 14
created_by_id: 1
created: 1587244432
updated: 1587244432
- id: 31
title: testbucket31
list_id: 15
created_by_id: 1
created: 1587244432
updated: 1587244432
- id: 32
title: testbucket32
list_id: 16
created_by_id: 1
created: 1587244432
updated: 1587244432
- id: 33
title: testbucket33
list_id: 17
created_by_id: 1
created: 1587244432
updated: 1587244432
# This bucket is the last one in its list
- id: 34
title: testbucket34
list_id: 18
created_by_id: 1
created: 1587244432
updated: 1587244432

View File

@ -87,12 +87,14 @@
updated: 1543626724
start_date_unix: 1544600000
end_date_unix: 1544700000
bucket_id: 1
- id: 10
text: 'task #10 basic'
done: false
created_by_id: 1
list_id: 1
index: 10
bucket_id: 1
created: 1543626724
updated: 1543626724
- id: 11
@ -101,6 +103,7 @@
created_by_id: 1
list_id: 1
index: 11
bucket_id: 1
created: 1543626724
updated: 1543626724
- id: 12
@ -109,6 +112,7 @@
created_by_id: 1
list_id: 1
index: 12
bucket_id: 1
created: 1543626724
updated: 1543626724
- id: 13
@ -117,6 +121,7 @@
created_by_id: 1
list_id: 2
index: 1
bucket_id: 4
created: 1543626724
updated: 1543626724
- id: 14
@ -125,6 +130,7 @@
created_by_id: 5
list_id: 5
index: 1
bucket_id: 18
created: 1543626724
updated: 1543626724
- id: 15
@ -133,6 +139,7 @@
created_by_id: 6
list_id: 6
index: 1
bucket_id: 6
created: 1543626724
updated: 1543626724
- id: 16
@ -141,6 +148,7 @@
created_by_id: 6
list_id: 7
index: 1
bucket_id: 7
created: 1543626724
updated: 1543626724
- id: 17
@ -149,6 +157,7 @@
created_by_id: 6
list_id: 8
index: 1
bucket_id: 8
created: 1543626724
updated: 1543626724
- id: 18
@ -157,6 +166,7 @@
created_by_id: 6
list_id: 9
index: 1
bucket_id: 9
created: 1543626724
updated: 1543626724
- id: 19
@ -165,6 +175,7 @@
created_by_id: 6
list_id: 10
index: 1
bucket_id: 10
created: 1543626724
updated: 1543626724
- id: 20
@ -173,6 +184,7 @@
created_by_id: 6
list_id: 11
index: 1
bucket_id: 11
created: 1543626724
updated: 1543626724
- id: 21
@ -181,6 +193,7 @@
created_by_id: 6
list_id: 12
index: 1
bucket_id: 12
created: 1543626724
updated: 1543626724
- id: 22
@ -189,6 +202,7 @@
created_by_id: 6
list_id: 13
index: 1
bucket_id: 13
created: 1543626724
updated: 1543626724
- id: 23
@ -197,6 +211,7 @@
created_by_id: 6
list_id: 14
index: 1
bucket_id: 14
created: 1543626724
updated: 1543626724
- id: 24
@ -205,6 +220,7 @@
created_by_id: 6
list_id: 15
index: 1
bucket_id: 15
created: 1543626724
updated: 1543626724
- id: 25
@ -213,6 +229,7 @@
created_by_id: 6
list_id: 16
index: 1
bucket_id: 16
created: 1543626724
updated: 1543626724
- id: 26
@ -221,6 +238,7 @@
created_by_id: 6
list_id: 17
index: 1
bucket_id: 17
created: 1543626724
updated: 1543626724
- id: 27
@ -229,6 +247,7 @@
created_by_id: 1
list_id: 1
index: 12
bucket_id: 1
created: 1543626724
updated: 1543626724
- id: 28
@ -238,6 +257,7 @@
repeat_after: 3600
list_id: 1
index: 13
bucket_id: 1
created: 1543626724
updated: 1543626724
- id: 29
@ -246,6 +266,7 @@
created_by_id: 1
list_id: 1
index: 14
bucket_id: 1
created: 1543626724
updated: 1543626724
- id: 30
@ -254,6 +275,7 @@
created_by_id: 1
list_id: 1
index: 15
bucket_id: 1
created: 1543626724
updated: 1543626724
- id: 31
@ -263,6 +285,7 @@
list_id: 1
index: 16
hex_color: f0f0f0
bucket_id: 1
created: 1543626724
updated: 1543626724
- id: 32
@ -271,6 +294,7 @@
created_by_id: 1
list_id: 3
index: 1
bucket_id: 21
created: 1543626724
updated: 1543626724
- id: 33
@ -280,6 +304,7 @@
list_id: 1
index: 17
percent_done: 0.5
bucket_id: 1
created: 1543626724
updated: 1543626724
# This task is forbidden for user1
@ -289,6 +314,7 @@
created_by_id: 13
list_id: 20
index: 20
bucket_id: 5
created: 1543626724
updated: 1543626724
- id: 35
@ -297,6 +323,7 @@
created_by_id: 1
list_id: 21
index: 1
bucket_id: 19
created: 1543626724
updated: 1543626724
- id: 36
@ -305,6 +332,7 @@
created_by_id: 1
list_id: 22
index: 1
bucket_id: 20
created: 1543626724
updated: 1543626724