Bug 157039 - Method to clear search text drop down list in Base form
Summary: Method to clear search text drop down list in Base form
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Base (show other bugs)
Version:
(earliest affected)
7.6.0.3 release
Hardware: All All
: medium enhancement
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: Database-Forms Privacy
  Show dependency treegraph
 
Reported: 2023-08-31 16:41 UTC by JD
Modified: 2024-04-22 03:42 UTC (History)
4 users (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description JD 2023-08-31 16:41:09 UTC
Description:
In a Base form record search, in the text selection, the drop down selection box shows suggestions from previous searches from any other database used which may be completely irrelevant to the current database being searched.
Need a way to clear previous search terms - such as a right click context action.

Steps to Reproduce:
1.Open a Base form
2.Select Record Search
3.Select Search for - Text
4.Select drop down

Actual Results:
Suggestions show all previous Base form searches

Expected Results:
Allow clearing of the drop down list suggestions.


Reproducible: Always


User Profile Reset: No

Additional Info:
Version: 7.6.0.3 (X86_64) / LibreOffice Community
Build ID: 69edd8b8ebc41d00b4de3915dc82f8f0fc3b6265
CPU threads: 12; OS: Windows 10.0 Build 22621; UI render: default; VCL: win
Locale: en-US (en_US); UI: en-US
Calc: threaded
Comment 1 Stéphane Guillou (stragu) 2023-09-28 21:41:13 UTC
That's a good point.
I can confirm that I can see previous searches from a different database in a form's Record Search dialog.

Version: 24.2.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: 2902ab24ecc5ffbf4907ea83b2028508b9de6364
CPU threads: 8; OS: Linux 5.15; UI render: default; VCL: gtk3
Locale: es-MX (en_AU.UTF-8); UI: en-US
Calc: threaded

As a comparison, the Find and Replace dialog in Calc and Writer only saves searches per session. Close and reopen LO, the list is cleared.

Maybe instead of adding a way to clear the search, it should just do like Calc and Writer and not save anything between sessions?

Although there is a request to go the opposite way and make Find and Replace _remember_ searched terms between sessions: Bug 122311

So a design decision should be consistent across these dialogs.
In my opinion, if search terms as saved, there should absolutely be an option to clear the list. And possibly, a setting to opt into it. (Thinking of shared computers on which one user might not like discovering that another user is able to see logged search terms they have used previously.)
Comment 2 Heiko Tietze 2023-09-29 10:07:17 UTC
The context menu solution sounds clunky to me. I can agree with Stephane's idea to remember only within the session. Storing per document could be a privacy issue since we need to save the data. JD, what do you think about just having a clean search when you restart the program?
Comment 3 Stéphane Guillou (stragu) 2023-09-29 10:24:56 UTC
(In reply to Heiko Tietze from comment #2)
> JD, what do you think about
> just having a clean search when you restart the program?

I think this is a good smaller, first solution to have some consistency and privacy-respecting default, before moving onto solving what bug 122311 requests in a thought-out way.
Comment 4 Heiko Tietze 2023-09-29 10:43:26 UTC
(In reply to Stéphane Guillou (stragu) from comment #3)
> I think this is a good smaller, first solution...
As long it doesn't break some workflow. If you think of internet browsers, for example, loosing the history would be very unpleasant.
Comment 5 Robert Großkopf 2023-09-29 13:11:01 UTC
Search dialog should only show relevant results in a selection. I would prefer to remember the results inside the database file. Another, not so good, solution will be to delete the results at the end of the session.

By the way: I don't use this kind of dialog for searching through a form. Too slow, too complicated and only results in one form, not in subforms …
Comment 6 Heiko Tietze 2023-10-19 13:31:14 UTC
We discussed the topic in the design meeting.

The implementation should either store the search terms in the database, or in case of too much effort clear after the session ends.
Comment 7 JD 2024-04-22 03:42:55 UTC
My original thought and suggestion was kind of based on the way Firefox handles the search field - past searches will appear as suggestions while typing in the search terms. And, in addition there is a right click option to clear the search history. History is kept between sessions.
I personally like the option to clear or keep but for consistency purposes a clean history at the start of each session - like calc & writer would be acceptable also.
Thanks for considering this.