go-vikunja / vikunja

Mirror of vikunja from https://code.vikunja.io/api
GNU Affero General Public License v3.0
806 stars 57 forks source link

Adding 'labels != <anything>' filter filters out all issues without a label set #285

Open bayger opened 3 weeks ago

bayger commented 3 weeks ago

Description

If you try to add any filter to NOT show issues with a particular label it also filters out all issues that have no label set. Expected behavior would be to show also issues without any label set and only filter out issues with specified label in the filter.

How to reproduce on the demo site:

Vikunja Version

0.24

Browser and version

No response

Can you reproduce the bug on the Vikunja demo site?

Yes

Screenshots

No response

kolaente commented 2 weeks ago

Does it work if you check the checkbox below the filter input which says 'include tasks which don't have a value set'?

bayger commented 2 weeks ago

Does it work if you check the checkbox below the filter input which says 'include tasks which don't have a value set'?

I don't have such checkbox available. Is it something new? My version is 0.24.0. image

kolaente commented 2 weeks ago

Ah, I thought you were using the filter in the view. I think to solve this properly, we'll need to implement null filtering as requested here and get rid of the checkbox: https://community.vikunja.io/t/filtering-search-for-null/2572/3

bayger commented 2 weeks ago

Now I wonder if we could simply return TRUE for the inequality operator applied to an empty/null entity? Or would it screw up something elsewhere? Not sure about the expected behavior there though.

kolaente commented 2 weeks ago

It's not as simple as that, because the query is translated to a sql query under the hood.