Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
lib: Fix filtering by payee and note (#598) #608
Neither parseQuery nor matchPosting/matchTransaction were set up to accept payee:/note: filters. Also, transactionNote was non-functional (it returned payee) and payeeAndNoteFromDescription didn't actually fulfill its documentation, namely "When there's no |, payee == note == description."
Edit: It's also occurred to me that in the Query datatype, Desc and Code are obsolete. I'd suggest either replacing them with either
Edit2: After looking at the code in more detail (and fixing broken tests, namely not:tag:.), it seems to me that the whole Query module could use some more datatypes instead of string matching - eg. aggregate implicit tags into a
Thanks for the fixes! Actually I hadn't thought of making payee and note searchable like first-class fields (tag:payee=... is what I expected to work). But after thinking about it, it makes sense. I think we should just say "you can pivot on these field names (description, payee, note..) or any tag name", and drop the "implicit tags" concept.
Aside: the payee/note feature is a complication, but I've wanted it often enough that I think it's worth keeping. I've been brainstorming different syntax/semantics for it, but I think the current behaviour is reasonable. We should probably add some tests. I will update docs soon.