Label filtering feedback - some observed bugs #2194

Closed
opened 2024-03-11 17:34:44 +00:00 by waza-ari · 13 comments
Contributor

Description

Hi,

first of all, I love the more flexible filter syntax! There's a few issues I noticed in our environment when playing around with it:

Filters after label filter

If you have a label filter, it's not easily possible to add another condition afterwards. Its mainly a UI bug I think:

image

Selecting project in filter doesn't work reliably

I have not figured out a pattern yet, I can fully reproduce it on my instance (v0.23.0+230-3b77fff4c9) and sometimes (tm) on try.vikunja.io (v0.23.0+240-659de54db1). Will try to experiment further and upgrade my instance. What I'm seeing is that sometimes the project selected will be selected correctly. See attached screen recording. On try, I can reproduce it sometimes, try to create a saved filter and use project = Label Feedback Project - it often automatically switches to project = Label Feedback Project - 2

Vikunja Version

v0.23.0+240-659de54db1

Browser and version

Firefox and Safair

Can you reproduce the bug on the Vikunja demo site?

Yes

Screenshots

No response

### Description Hi, first of all, I love the more flexible filter syntax! There's a few issues I noticed in our environment when playing around with it: ### Filters after label filter If you have a label filter, it's not easily possible to add another condition afterwards. Its mainly a UI bug I think: ![image](/attachments/dcf190c5-ccb6-4b25-aa9e-b03b62ff2ee2) ### Selecting project in filter doesn't work reliably I have not figured out a pattern yet, I can fully reproduce it on my instance (`v0.23.0+230-3b77fff4c9`) and sometimes (tm) on try.vikunja.io (`v0.23.0+240-659de54db1`). Will try to experiment further and upgrade my instance. What I'm seeing is that sometimes the project selected will be selected correctly. See attached screen recording. On try, I can reproduce it sometimes, try to create a saved filter and use `project = Label Feedback Project` - it often automatically switches to `project = Label Feedback Project - 2` ### Vikunja Version v0.23.0+240-659de54db1 ### Browser and version Firefox and Safair ### Can you reproduce the bug on the Vikunja demo site? Yes ### Screenshots _No response_
waza-ari added the
kind/bug
label 2024-03-11 17:34:44 +00:00
Owner

This looks like it's related to the way the projects are fetched.

This looks like it's related to the way the projects are fetched.
Author
Contributor

Might be. Am on a business trip the next two weeks, not sure how much time I’ll have to investigate :(

Might be. Am on a business trip the next two weeks, not sure how much time I’ll have to investigate :(
Owner

The first issue should be fixed in e44897e0d4.

I'm currently looking at the second issue, while I couldn't exactly reproduce what you showed in the video, I managed to find something funky happening.

The first issue should be fixed in e44897e0d4aaf0cc3dec9895e829c6950f00efd8. I'm currently looking at the second issue, while I couldn't exactly reproduce what you showed in the video, I managed to find *something* funky happening.
Author
Contributor

Something funky is a good description - I wasn’t able to reproduce it deterministic. It happens sometimes, but not every time, even on the very same set of projects, but I haven’t been able to figure out which conditions trigger the issues and which don’t

_Something_ funky is a good description - I wasn’t able to reproduce it deterministic. It happens sometimes, but not every time, even on the very same set of projects, but I haven’t been able to figure out which conditions trigger the issues and which don’t
Owner

Looks like the problem with the project replacement seems to happen when the actual project in the filter contains the word project (or parts of it).

Looks like the problem with the project replacement seems to happen when the actual project in the filter contains the word `project` (or parts of it).
Owner

The other issue should be resolved in e1c972d64d - please check with the next unstable build.

The other issue should be resolved in https://kolaente.dev/vikunja/vikunja/commit/e1c972d64d8e614b3c423a1644e6d9e01e0f8b28 - please check with the next unstable build.
Author
Contributor

Hi, first of all, thank (again) for your work! Can confirm the first bug is fixed, the second one is sadly not fixed. It doesn't only affect projects containing the word "project". I managed to reproduce it on try, still not consistently though

  • Create two projects: "ABCDE - ASD" and "ABCDE - EFD"
  • Start to create a saved filter and try to select "ABCDE - EFD" - it jumps back to "ABCDE - ASD"
  • Close the modal without saving anything
  • Start to create the saved filter again - now the project stays selected. Save it.
  • Edit the same saved filter: it sometimes jumps back, sometimes doesn't.

I'm still not sure what conditions need to be met. Opening the same saved filter (called it "waza-ari-project-test" for now) multiple times within a minute yields inconsistent results :(

Things I tried to exclude so far:

  • I don't see any API request nor error in the console while selecting the project
  • It is not related to dashes in the project name - happens with other project names, too
  • Doesn't seem to be related to a particular browser - see it on MS Edge, Firefox, Safari and Chrome
Hi, first of all, thank (again) for your work! Can confirm the first bug is fixed, the second one is sadly not fixed. It doesn't only affect projects containing the word "project". I managed to reproduce it on try, still not consistently though - Create two projects: "ABCDE - ASD" and "ABCDE - EFD" - Start to create a saved filter and try to select "ABCDE - EFD" - it jumps back to "ABCDE - ASD" - Close the modal without saving anything - Start to create the saved filter again - now the project stays selected. Save it. - Edit the same saved filter: it sometimes jumps back, sometimes doesn't. I'm still not sure what conditions need to be met. Opening the same saved filter (called it "waza-ari-project-test" for now) multiple times within a minute yields inconsistent results :( Things I tried to exclude so far: - I don't see any API request nor error in the console while selecting the project - It is not related to dashes in the project name - happens with other project names, too - Doesn't seem to be related to a particular browser - see it on MS Edge, Firefox, Safari and Chrome
waza-ari reopened this issue 2024-03-12 22:40:24 +00:00
Owner

Thanks!

I was able to reproduce it the first time with your reproduction steps. Will look into a fix.

Thanks! I was able to reproduce it the first time with your reproduction steps. Will look into a fix.
Owner

Should be fixed in d4605905d3 - please check again with the next unstable build.

Should be fixed in d4605905d3ef32807ae39e8f409753fd5e1e9b7f - please check again with the next unstable build.
Author
Contributor

Hi, thanks, can confirm it works! Unfortunately found another one (or two, not sure):

Try to create a Saved filter involving both a project and a label. On try for example:

  • Create Saved Filter
  • Select any project (e.g. project = Smart home)
  • Try to add a label condition (&& labels = green)
  • The end result will be something along the lines of project =3eenmart home && labels = undefined

See attached video (recorded on try)

Maybe similar, but also this doesn't work:

project = Smart home && done = true

This will yield both a green success message and an error message:

Error
The filter expression 'project = Smart home && done = true' is invalid: expected && or ||, got "home" (identifier)

Let me know if I can be of any help please.

Hi, thanks, can confirm it works! Unfortunately found another one (or two, not sure): Try to create a Saved filter involving both a project and a label. On try for example: - Create Saved Filter - Select any project (e.g. `project = Smart home`) - Try to add a label condition (`&& labels = green`) - The end result will be something along the lines of `project =3eenmart home && labels = undefined` See attached video (recorded on try) Maybe similar, but also this doesn't work: ``` project = Smart home && done = true ``` This will yield both a green success message **and** an error message: ``` Error The filter expression 'project = Smart home && done = true' is invalid: expected && or ||, got "home" (identifier) ``` Let me know if I can be of any help please.
Author
Contributor

Not sure if it helps, but when going through the database on my instance it looks like the project name is not substituted with the ID, its actually stored like this in database:

{"sort_by":["done","id"],"order_by":["asc","desc"],"filter":"project = Vorstand \u0026\u0026 labels = 8","filter_include_nulls":true}

If I change Vorstand to the corresponding numeric id manually, the filter works as expected.

Not sure if it helps, but when going through the database on my instance it looks like the project name is not substituted with the ID, its actually stored like this in database: ``` {"sort_by":["done","id"],"order_by":["asc","desc"],"filter":"project = Vorstand \u0026\u0026 labels = 8","filter_include_nulls":true} ``` If I change `Vorstand` to the corresponding numeric id manually, the filter works as expected.
Owner

The actual filter on the server needs IDs to do the filtering, that's why a filter which contains the project title only will not work. That is resolved in the frontend before the filter string is sent to the api, and it looks like that's where the problem was.

This should now be fixed, in 161bb1b192, c8b35d49ca, 6cf3a578c0, 96186250f4

The replacement back (from titles to ids) didn't work correctly - now it should all be good. Please verify on try, you know the drill :)

The actual filter on the server needs IDs to do the filtering, that's why a filter which contains the project title only will not work. That is resolved in the frontend before the filter string is sent to the api, and it looks like that's where the problem was. This should now be fixed, in 161bb1b19258231fb6b89d49c883f0e0ee88d205, c8b35d49ca8735748490c93b5e7084184d14e9c4, 6cf3a578c083dc1066b09ae727407305be10611f, 96186250f479684a1f1d2fc86fd09c1c5a4a5356 The replacement back (from titles to ids) didn't work correctly - now it should all be good. Please verify on try, you know the drill :)
Author
Contributor

That makes a lot of sense and works wonderfully now, thanks again!

I'm really feeling sorry already, but found yet another one :(

On try, create the following saved filter:

project = demo && labels = test

That works fine. Then try to add another condition && done = false to it, this won't get saved and removed before saving.

Edit: never mind, just discovered it has nothing to do with the syntax, it's just me being too fast for the debouncing logic. If I click the save button too quick, it just reverts to the previous saved filter. Maybe it makes sense to disable the save button while debouncing is in progress?

That makes a lot of sense and works wonderfully now, thanks again! I'm really feeling sorry already, but found yet another one :( On try, create the following saved filter: ``` project = demo && labels = test ``` That works fine. Then try to add another condition `&& done = false` to it, this won't get saved and removed before saving. Edit: never mind, just discovered it has nothing to do with the syntax, it's just me being too fast for the debouncing logic. If I click the save button too quick, it just reverts to the previous saved filter. Maybe it makes sense to disable the save button while debouncing is in progress?
Sign in to join this conversation.
No Milestone
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: vikunja/vikunja#2194
No description provided.