actual icon indicating copy to clipboard operation
actual copied to clipboard

[Bug]: filtering by one-of notes

Open MatissJanis opened this issue 1 year ago • 4 comments

Verified issue does not already exist?

  • [X] I have searched and found no existing issue

What happened?

Tricky to explain.. please see the video

https://user-images.githubusercontent.com/886567/226101719-3b700472-3dd0-4538-81b8-6c77d2270d0c.mov

What error did you receive?

No response

Where are you hosting Actual?

Locally via Yarn

What browsers are you seeing the problem on?

Chrome

Operating System

Mac OSX

MatissJanis avatar Mar 18 '23 11:03 MatissJanis

I am unclear as to what the "One of" filter is intended for. Or what separator there should be between search criteria if this is used. When I try it, I get a message Notes: Value cannot be empty PS I have a very comprehensive store of Notes on transactions going back three years so will happily test anything you think of.

Kidglove57 avatar Mar 18 '23 11:03 Kidglove57

You need to click "enter" for the filter to be applied.

--

But the issue here is: after adding the one-of filter and clicking on "edit" - the fields in "is" and "contains" section are not rendered.

MatissJanis avatar Mar 18 '23 11:03 MatissJanis

Thank you for explaining:

  1. I can see what you mean now! Sorry I did not pick that up immediately. Very strange indeed. In practice I cannot see how "one of" could ever be relevant in the notes field (as it is freeform) As an added issue:
  2. If I click "Apply" after making an entry in the "Is" or "Contains" fields I get a filter result even without additionally clicking "enter". So is there an inconsistency here? BUT seems irrelevant option in this field - only needed where there is multiple choice? I notice that it is not included in a number of other filter fields.

I would suggest removing this option from the Notes filter

Kidglove57 avatar Mar 18 '23 12:03 Kidglove57

As far as I understand there is no well-defined defined GenericInput of type string with multi set due to the auto-complete mechanism.

  // This makes the UI more resilient in case of faulty data
  if (multi && !Array.isArray(value)) {
    value = [];
  } else if (!multi && Array.isArray(value)) {
    return null;
  }

I'm curious what issues emerged from normalizing the field, because this PR was reopened.

jacksoncooper avatar Jun 21 '23 18:06 jacksoncooper

I would agree with with Kid. I don't think this option is needed for Notes. You can attain the same functionality with the all/any list as well. this dropdown option is a new addition and didn't exist when this issue was raised. Could remove "one-of" from notes and mark this resolved as of the merge of the saved filters PR.

carkom avatar Jul 08 '23 19:07 carkom

I'm going to update my comment. This is also an issue when going from OneOf to is for all "id" type elements.

carkom avatar Jul 08 '23 20:07 carkom