-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changing search scope does not reset selected search fields (search_mods) #6919
Comments
What version? What PHP version? Any errors in logs? Did you try with disabled all plugins? Anything in browser console? Maybe it just takes too long and exceeds the request limit. |
Roundcube 1.3.9, PHP 7.3.6, no errors, I did try disabling all plugins, nothing in browser console, it does not take too long. |
Do you see the request in Network tab of the browser console? What is the response? |
I see request and and response in network tab. HTTP response from the server is:
IMAP debug:
|
So, every folder is asked for
and the server responds with an empty result. I don't see a bug here. It looks like it searches in Subject and From headers. Is it not what you selected in the search form? |
@alecpl I think I know what they did. Try these steps (in git-master, elastic skin)
you should see that he search was only run on "subject" if you open the search widget you should see that now only "subject" is selected. It looks like the. It looks like the field selection of your previous search in that scope is being remembered and used when you change scope rather than what is currently selected in the UI. |
Yeah, something like John described: |
This actually is not that easy to fix. I think it was a mistake to make "All folders" search to use separate set of headers/fields ( I see two options to fix this:
While I understand that it might be useful from performance perspective to not search in entire message or body in all folders, I think from user perspective this is confusing complication. User expects to search in the fields that are currently selected. That's why I'm for the solution 1. @thomascube what do you think? |
@alecpl Using current (folder) search fields is also not transparent for the user. We should probably think of getting rid of the search_mods for each folder and just use one global setting. However, this might be inconvenient when searching in sent or draft folders where we choose other default headers (from/to swapped). If I understand correctly, the reported issue is more about the search UI not correctly displaying which fields are being used for searching. |
@thomascube, Not storing the setting per-folder would be a 3rd option to consider. Probably storing the fields per-folder is not the main issue. At least it wasn't for a long time. The problem appeared with the multi-folder searches implementation. When you switch to/from multi-folder, fields selection should be updated. Maybe that would be as simple as that, but... When you are already in a search mode switching to/from multi-folder automatically restarts the search (not in Elastic, but in Larry and Classic). I think this part considering list of fields is confusing (no matter if we update the fields or not). An obvious solution would be to not restart the search automatically. This is what I was talking about in 2nd point of my comment. On the other hand, maybe all of this is too complicated still and could be simplified somehow? I think the 3rd option might be the best, even if it would bring some small inconveniences. In Thunderbird, for example, fields are not per-folder. |
That's certainly a good idea and would likely avoid some of the confusion. In Elastic the search form is completely reset when switching folders, including the search field is cleared. That I find annoying. In my opinion, the most desirable behavior is to update the UI (search fields) but keep the search term when either switching folders or changing search scope (which finally also changes the folder(s) to be searched in). |
So, when switching scope we reset fields and do not restart search automatically. That probably could work, but I have a feeling this could be better (simpler?).
This is the same in all skins. I think it's been simplified at some point, because there was some issues with not resetting the search on folder change. I don't remember whether it was only confusing some users or there was some other issue. That is a separate case, anyway. |
According to the documentation "The entry with key '*' stands for all folders which do not have a specific list set.". So, for me it is quite clear that
|
- Don't start search on initerval and scope search - Use currently selected criteria instead of the criteria defined in search_mods[*]
Fixed. |
Hi,
when I do search in Current folder I get results, but when I do search on All folders I do not get any result set.
The text was updated successfully, but these errors were encountered: