Tasks are not properly updated
Closed this issue · 3 comments
After a db reset I noticed that the tasks are not updated when using manage.py updatebbdb --all
or manage.py updatebbdb -t
(update stored tasks; get admin link, get priority).
The problem is this condition:
bugboard/bugboard/management/commands/updatebbdb.py
Lines 277 to 285 in ded27c4
admin_link
& priority
are updated (even for the first time) only if the distant task was updated since it was downloaded.
Reopening this issue because these two lines are not updated when a task already exist in the db:
bugboard/bugboard/management/commands/updatebbdb.py
Lines 325 to 326 in ded27c4
The problem is that when using api_v2/projects/X/tasks/
, we have an assignee_ids
list, but when using api_v2/projects/X/tasks/Y.json
, we only have an assignees
dict, which is in fact a Member
object.
So when updating tasks from local db list, we have to loop through the assignees
dict to gather all id
s, then append them to self.task_assignees_list
.
The problem with assignee is not solved, because we fill self.task_assignees_list
but we do not synchronize it with the db.