go-vikunja / vikunja

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

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

Open bayger opened 4 months ago

bayger commented 4 months 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 4 months 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 4 months 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 4 months 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 4 months 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 4 months ago

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