Sorting tasks based priority - empty values included in sort

Describe the bug

When sorting tasks based on priority, the tasks with empty priority values are also included in the sort (and it looks like they are assumed to have a value of zero). When sorting based on ascending priority, the tasks with empty values come first, which is not expected behavior.

To Reproduce

Steps to reproduce the behavior:

    1. Create a set of tasks and add a few tasks
    1. Give priority to a few tasks and leave the rest empty
    1. Sort based on priority - ascending.
    1. See the empty priority tasks at the top

Expected behavior

Tasks with empty values should not be part of the sort. More generally, when objects are in sets, the ones with empty values should be excluded from the sort and placed at the bottom.

System Information:

  • OS: Arch linux
  • Anytype Version: 0.19.9

Additional context

I am describing a specific problem with task set here, but I think it applies generally to sets of objects.

Image of the problem:


Same issue with date sorting. E.g., if one wants to sort tasks by date in an ascending order to put the most pressing tasks upfront, tasks with no due dates show up first instead of last.


@sjmgarnier Thank you for your notice! It has been added to the bug tracker

1 Like

Are there any updates on this? I assumed that this was actually by design.