After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 745354 - Find dialog should more easily allow certain complex searches
Find dialog should more easily allow certain complex searches
Status: RESOLVED FIXED
Product: GnuCash
Classification: Other
Component: User Interface General
git-master
Other All
: Normal enhancement
: ---
Assigned To: gnucash-ui-maint
gnucash-ui-maint
Depends on:
Blocks:
 
 
Reported: 2015-03-01 06:34 UTC by Mike Alexander
Modified: 2018-06-29 23:38 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Mike Alexander 2015-03-01 06:34:43 UTC
This describes an enhancement to the "Find Transactions" dialog that I have implemented but not yet checked in.  I'm entering it to document what I've done and solicit comments.

I often want to search for the same text in any of the Notes, Memo, or Description fields of a transaction.  This is cumbersome since I have to enter three separate selectors with essentially the same contents in the find dialog and remember to change the default from "all criteria" to "any criteria".  To make this easier to do I've extended the Find Transactions dialog to allow a single criterion to expand to a more complex search.  Currently each criterion in the dialog corresponds to a single query term.  With this change it can correspond to an arbitrary "and" or "or" of several query terms.

Internally this is done by changing GNCSearchParam to be a base class with two subclasses, GNCSearchParamSimple and GNCSearchParamCompound.  The former is like the old GNCSearchParam class while the latter specifies a list of GNCSearchParam's (simple or compound) to be anded or ored together.  All of them must be the same type since there is only one input field to be used for all of them.

GNCSearchParam objects are currently used for two purposes: to specify the search terms and to specify the columns to be displayed in things the reconcile and find bills dialogs.  The latter use requires a GNCSearchParamSimple, the new form can only be used to specify a search term.

So far I've only used this for one purpose: to define a new criterion in the Find Transactions dialog called "Description, Notes, or Memo" which looks for the given text in any of those three fields.

Unless someone can think of a reason not to, I'll push this change in a few days.  Do people think it is appropriate for the maint branch, or is it too big a change for that?
Comment 1 Mike Alexander 2017-11-15 06:35:20 UTC
This change was included in version 2.6.5.
Comment 2 John Ralls 2018-06-29 23:38:56 UTC
GnuCash bug tracking has moved to a new Bugzilla host. This bug has been copied to https://bugs.gnucash.org/show_bug.cgi?id=745354. Please update any external references or bookmarks.