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 115066 - "Search For" dialog shows all when criteria is left as default
"Search For" dialog shows all when criteria is left as default
Status: VERIFIED FIXED
Product: GnuCash
Classification: Other
Component: Business
git-master
Other All
: Normal normal
: ---
Assigned To: Derek Atkins
Derek Atkins
: 562134 (view as bug list)
Depends on:
Blocks: 478463 backport
 
 
Reported: 2003-06-13 03:30 UTC by wolff_borg
Modified: 2018-06-29 20:33 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
patch to allow empty list of search criterion, or empty search string in search dialogs (1.13 KB, patch)
2008-01-18 09:23 UTC, David Fraser
rejected Details | Review
First try (4.74 KB, patch)
2008-02-10 02:51 UTC, Andreas Köhler
none Details | Review
Second try, trivial optimization (258 bytes, patch)
2008-02-10 02:54 UTC, Andreas Köhler
none Details | Review
Third try, arrrgh (saved wrong buffer) (4.72 KB, patch)
2008-02-10 02:57 UTC, Andreas Köhler
committed Details | Review

Description wolff_borg 2003-06-13 03:30:48 UTC
When "Search For" dialog is shown, it is intuitive to immediately hit find
to show all. Could this be implmented please?
Comment 1 Derek Atkins 2003-06-13 03:39:43 UTC
I think a better solution is a "find all" button..
But I'll see about string-searches coping with empty input.
Comment 2 Carl Parrish 2003-06-13 16:52:16 UTC
how do we vote on bugs? I would *really* love to see this.
Comment 3 Derek Atkins 2003-06-13 17:05:46 UTC
you vote by submitting code ;)
Comment 4 Christian Stimming 2006-10-18 12:31:46 UTC
See also bug#101456
Comment 5 David Fraser 2008-01-18 09:16:12 UTC
Aha, I have a patch for this in bug 101456 - see attachment 97818 [details] [review]. I'll attach it here too if necessary...
Comment 6 David Fraser 2008-01-18 09:23:38 UTC
Created attachment 103126 [details] [review]
patch to allow empty list of search criterion, or empty search string in search dialogs

Attached patch from the other bug here, now hopefully it will make it in... here is a summary of the explanation from the other bug

This enables removing all search criteria, in which case all results will be
returned. It also removes the check to ensure that the search string is not empty, if the search type is "contains".
As you would logically expect, all strings contain the empty string.
So now you can simply click "Find" (or press Alt-F) from the default search
criteria (usually contains with an empty string on some field) and all records
will be returned.
It should work from any standard GnuCash search dialog.

Patch attached against GnuCash 2.2.1, tested on Fedora on the busines dialogs -
Customers, Invoices, Bills, etc

I've also checked that applies cleanly on trunk as of today...
Comment 7 Andreas Köhler 2008-02-10 02:51:12 UTC
Created attachment 104813 [details] [review]
First try

Allow to remove all elements which results in an "empty" new/refinement/... search matching all available items.  In that case grey out the match-type combo in the upper right corner and add a label "Match all entries" where the criteria list used to sit.

Opinions?
Especially, how should the criteria list look alike after search_clear_criteria()?
Comment 8 Andreas Köhler 2008-02-10 02:54:20 UTC
Created attachment 104814 [details] [review]
Second try, trivial optimization
Comment 9 Andreas Köhler 2008-02-10 02:57:40 UTC
Created attachment 104815 [details] [review]
Third try, arrrgh (saved wrong buffer)
Comment 10 David Fraser 2008-02-10 20:42:19 UTC
Re comment #9:
Just curious as to how this varies from my original patch - I see you have better ways of checking if a list is empty, and obviously have done more on the UI.

I also had a change to search-string.c to handle empty search strings as it didn't make sense to me to disallow searching for "contains an empty string" since this should obviously match all strings - what do you think of that?
Comment 11 Andreas Köhler 2008-02-10 20:59:03 UTC
Personally, I do not like searching for empty strings at all, so I grabbed your original patch and added a little more UI, just as you said.
Comment 12 Christian Stimming 2008-11-16 21:46:24 UTC
Looks good to me. r17705, awaiting back-port.
Comment 13 Christian Stimming 2008-11-26 13:18:20 UTC
*** Bug 562134 has been marked as a duplicate of this bug. ***
Comment 14 Christian Stimming 2008-12-06 22:08:50 UTC
Committed to 2.2 branch, r17754. Thanks a lot!
Comment 15 John Ralls 2018-06-29 20:33:42 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=115066. Please update any external references or bookmarks.