diff --git a/Featurecreep.md b/Featurecreep.md index ec8ee58c10f..8ea57909fce 100644 --- a/Featurecreep.md +++ b/Featurecreep.md @@ -88,6 +88,7 @@ Sorry for some of them being in German, I'll tranlate them at some point. * [x] Team member handling * [x] Also check `ReadOne()` for unnessecary database operations since the inital query is already done in `CanRead()` * [x] Add a `User.AfterLoad()` which obfuscates the email address +* [x] Fix priority not updating to 0 ### Docs @@ -188,10 +189,6 @@ Sorry for some of them being in German, I'll tranlate them at some point. * [ ] Check if the team/user really exist before updating them on lists/namespaces * [ ] Check if the email is properly obfuscated everywhere -> alter GetUser() and add a new method GetUserWithEmail -### Fixes - -* [ ] Fix priority not updating to 0 - ### Linters * [x] goconst diff --git a/REST-Tests/lists.http b/REST-Tests/lists.http index 70b23153378..fc6c0dab889 100644 --- a/REST-Tests/lists.http +++ b/REST-Tests/lists.http @@ -1,17 +1,17 @@ # Get all lists -GET http://localhost:8080/api/v1/namespaces/1 +GET http://localhost:8080/api/v1/namespaces/35/lists Authorization: Bearer {{auth_token}} ### # Get one list -GET http://localhost:8080/api/v1/lists/27 +GET http://localhost:8080/api/v1/lists/1172 Authorization: Bearer {{auth_token}} ### # Add a new list -PUT http://localhost:8080/api/v1/namespaces/1/lists +PUT http://localhost:8080/api/v1/namespaces/35/lists Authorization: Bearer {{auth_token}} Content-Type: application/json @@ -135,10 +135,7 @@ Authorization: Bearer {{auth_token}} Content-Type: application/json { - "labels": [ - {"id": 1}, - {"id": 2} - ] + "priority": 0 } ### diff --git a/pkg/models/list_tasks_create_update.go b/pkg/models/list_tasks_create_update.go index b8504bb4bc1..1703f580d2f 100644 --- a/pkg/models/list_tasks_create_update.go +++ b/pkg/models/list_tasks_create_update.go @@ -133,6 +133,11 @@ func (t *ListTask) Update() (err error) { ot.Done = false } + // If the priority is 0, we also need to explicitly check that here + if t.Priority == 0 { + ot.Priority = 0 + } + _, err = x.ID(t.ID). Cols("text", "description",