Skip to content
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

Closed
rokj opened this issue Sep 9, 2019 · 14 comments
Closed

Comments

@rokj
Copy link
Contributor

rokj commented Sep 9, 2019

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.

Screenshot from 2019-09-09 15-24-11
Screenshot from 2019-09-09 15-24-27

@alecpl
Copy link
Member

alecpl commented Sep 9, 2019

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.

@rokj
Copy link
Contributor Author

rokj commented Sep 10, 2019

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.

@alecpl
Copy link
Member

alecpl commented Sep 10, 2019

Do you see the request in Network tab of the browser console? What is the response?
Enable imap_debug to see what folders are searched and how, and what is the server response.

@rokj
Copy link
Contributor Author

rokj commented Sep 11, 2019

I see request and and response in network tab.

HTTP response from the server is:

{ 
   "action":"search",
   "unlock":"loading1568195173895",
   "env":{ 
      "multifolder_listing":true,
      "search_request":"d1963296b1746dd8bc87df614480794f",
      "search_filter":"ALL",
      "messagecount":0,
      "pagecount":0,
      "exists":0
   },
   "texts":{ 
      "spamoz.spamoz":"SpamOZ",
      "spamoz.title":"SpamOZ Settings",
      "spamoz.noconnection":"Cannot contact SpamOZ server. Please try again later.",
      "spamoz.legend_spam":"Spam Settings",
      "spamoz.legend_antivirus":"Antivirus Settings",
      "spamoz.label_level":"Spam Level",
      "spamoz.label_duration":"Spam Duration",
      "spamoz.ndays":"$n",
      "spamoz.label_antivirus":"Enable Antivirus",
      "spamoz.save_success":"SpamOz settings have been successfuly updated.",
      "spamoz.save_error":"An error has occured. Settings were not saved.",
      "spamoz.invalid_data":"Invalid email or spam list name. Please try again.",
      "spamoz.already_exists":"Email already exists in one of the lists.  Please try again.",
      "spamoz.whitelist":"Whitelist",
      "spamoz.blacklist":"Blacklist",
      "spamoz.title_whitelist":"SpamOz Whitelist",
      "spamoz.title_blacklist":"SpamOz Blacklist",
      "spamoz.title_addtospamlist":"Add new email",
      "spamoz.label_email":"Email",
      "spamoz.add":"Add",
      "spamoz.confirm_addtolist":"Are you sure you want to add this email to list?",
      "spamoz.confirm_delete":"Are you sure you want to delete this email from list?",
      "spamoz.alert_notvalidemail":"Please enter valid email address.",
      "spamoz.hint_deletefromlist":"Delete from list",
      "spamoz.ico_title_addtowhitelist":"Add to Whitelist",
      "spamoz.ico_title_addtoblacklist":"Add to Blacklist"
   },
   "exec":"this.display_message(\"Search returned no matches.\",\"notice\",0);\nthis.select_folder(\"\");\nthis.set_rowcount(\"No messages\",null);\nthis.set_pagetitle(\"webmail.arnes.si :: Search result\");\nthis.set_quota({\"used\":633413,\"total\":20971520,\"percent\":3,\"free\":97,\"type\":\"image\",\"folder\":\"INBOX\",\"title\":\"618 MB \\\/ 20 GB (3%)\"});\n"
}

IMAP debug:

[11-Sep-2019 11:39:31 +0200]: <ocs3ehrt> [0AD3] S: * OK [CAPABILITY IMAP4rev1 LITERAL+ SASL-IR LOGIN-REFERRALS ID ENABLE IDLE STARTTLS AUTH=PLAIN AUTH=LOGIN] Server ready.
[11-Sep-2019 11:39:31 +0200]: <ocs3ehrt> [0AD3] C: A0001 ID ("name" "Roundcube" "version" "1.3.9" "php" "7.3.9-1+ubuntu18.04.1+deb.sury.org+1" "os" "Linux" "command" "/?_task=mail&_action=search&_filter=ALL&_interval=&_q=kon%C4%8Dala&_headers=subject%2Cfrom&_scope=all&_remote=1&_unlock=loading1568194771226&_=1568193972488")
[11-Sep-2019 11:39:31 +0200]: <ocs3ehrt> [0AD3] S: * ID ("name" "Dovecot")
[11-Sep-2019 11:39:31 +0200]: <ocs3ehrt> [0AD3] S: A0001 OK ID completed.
[11-Sep-2019 11:39:31 +0200]: <ocs3ehrt> [0AD3] C: A0002 AUTHENTICATE PLAIN ****** [21]
[11-Sep-2019 11:39:31 +0200]: <ocs3ehrt> [0AD3] S: A0002 OK [CAPABILITY IMAP4rev1 LITERAL+ SASL-IR LOGIN-REFERRALS ID ENABLE IDLE SORT SORT=DISPLAY THREAD=REFERENCES THREAD=REFS THREAD=ORDEREDSUBJECT MULTIAPPEND URL-PARTIAL CATENATE UNSELECT CHILDREN NAMESPACE UIDPLUS LIST-EXTENDED I18NLEVEL=1 CONDSTORE QRESYNC ESEARCH ESORT SEARCHRES WITHIN CONTEXT=SEARCH LIST-STATUS BINARY MOVE SEARCH=FUZZY NOTIFY COMPRESS=DEFLATE QUOTA] Logged in
[11-Sep-2019 11:39:31 +0200]: <ocs3ehrt> [0AD3] C: A0003 SELECT INBOX
[11-Sep-2019 11:39:31 +0200]: <ocs3ehrt> [0AD3] S: * FLAGS (\Answered \Flagged \Deleted \Seen \Draft Junk NonJunk $Forwarded)
[11-Sep-2019 11:39:31 +0200]: <ocs3ehrt> [0AD3] S: * OK [PERMANENTFLAGS (\Answered \Flagged \Deleted \Seen \Draft Junk NonJunk $Forwarded \*)] Flags permitted.
[11-Sep-2019 11:39:31 +0200]: <ocs3ehrt> [0AD3] S: * 238 EXISTS
[11-Sep-2019 11:39:31 +0200]: <ocs3ehrt> [0AD3] S: * 0 RECENT
[11-Sep-2019 11:39:31 +0200]: <ocs3ehrt> [0AD3] S: * OK [UNSEEN 36] First unseen.
[11-Sep-2019 11:39:31 +0200]: <ocs3ehrt> [0AD3] S: * OK [UIDVALIDITY 1550496879] UIDs valid
[11-Sep-2019 11:39:31 +0200]: <ocs3ehrt> [0AD3] S: * OK [UIDNEXT 262] Predicted next UID
[11-Sep-2019 11:39:31 +0200]: <ocs3ehrt> [0AD3] S: * OK [HIGHESTMODSEQ 697] Highest
[11-Sep-2019 11:39:31 +0200]: <ocs3ehrt> [0AD3] S: A0003 OK [READ-WRITE] Select completed (0.000 + 0.000 secs).
[11-Sep-2019 11:39:31 +0200]: <ocs3ehrt> [0AD3] C: A0004 UID SEARCH RETURN (ALL) CHARSET UTF-8 OR HEADER SUBJECT {8+}
[11-Sep-2019 11:39:31 +0200]: <ocs3ehrt> [0AD3] C: končala HEADER FROM {8+}
[11-Sep-2019 11:39:31 +0200]: <ocs3ehrt> [0AD3] C: končala
[11-Sep-2019 11:39:31 +0200]: <ocs3ehrt> [0AD3] S: * ESEARCH (TAG "A0004") UID
[11-Sep-2019 11:39:31 +0200]: <ocs3ehrt> [0AD3] S: A0004 OK Search completed (0.002 + 0.000 secs).
[11-Sep-2019 11:39:31 +0200]: <ocs3ehrt> [0AD3] C: A0005 SELECT Junk
[11-Sep-2019 11:39:31 +0200]: <ocs3ehrt> [0AD3] S: * OK [CLOSED] Previous mailbox closed.
[11-Sep-2019 11:39:31 +0200]: <ocs3ehrt> [0AD3] S: * FLAGS (\Answered \Flagged \Deleted \Seen \Draft Junk)
[11-Sep-2019 11:39:31 +0200]: <ocs3ehrt> [0AD3] S: * OK [PERMANENTFLAGS (\Answered \Flagged \Deleted \Seen \Draft Junk \*)] Flags permitted.
[11-Sep-2019 11:39:31 +0200]: <ocs3ehrt> [0AD3] S: * 1 EXISTS
[11-Sep-2019 11:39:31 +0200]: <ocs3ehrt> [0AD3] S: * 0 RECENT
[11-Sep-2019 11:39:31 +0200]: <ocs3ehrt> [0AD3] S: * OK [UIDVALIDITY 1550496889] UIDs valid
[11-Sep-2019 11:39:31 +0200]: <ocs3ehrt> [0AD3] S: * OK [UIDNEXT 2] Predicted next UID
[11-Sep-2019 11:39:31 +0200]: <ocs3ehrt> [0AD3] S: * OK [HIGHESTMODSEQ 3] Highest
[11-Sep-2019 11:39:31 +0200]: <ocs3ehrt> [0AD3] S: A0005 OK [READ-WRITE] Select completed (0.000 + 0.000 secs).
[11-Sep-2019 11:39:31 +0200]: <ocs3ehrt> [0AD3] C: A0006 UID SEARCH RETURN (ALL) CHARSET UTF-8 OR HEADER SUBJECT {8+}
[11-Sep-2019 11:39:31 +0200]: <ocs3ehrt> [0AD3] C: končala HEADER FROM {8+}
[11-Sep-2019 11:39:31 +0200]: <ocs3ehrt> [0AD3] C: končala
[11-Sep-2019 11:39:31 +0200]: <ocs3ehrt> [0AD3] S: * ESEARCH (TAG "A0006") UID
[11-Sep-2019 11:39:31 +0200]: <ocs3ehrt> [0AD3] S: A0006 OK Search completed (0.001 + 0.000 secs).
[11-Sep-2019 11:39:31 +0200]: <ocs3ehrt> [0AD3] C: A0007 SELECT mail/Osnutki
[11-Sep-2019 11:39:31 +0200]: <ocs3ehrt> [0AD3] S: * OK [CLOSED] Previous mailbox closed.
[11-Sep-2019 11:39:31 +0200]: <ocs3ehrt> [0AD3] S: * FLAGS (\Answered \Flagged \Deleted \Seen \Draft)
[11-Sep-2019 11:39:31 +0200]: <ocs3ehrt> [0AD3] S: * OK [PERMANENTFLAGS (\Answered \Flagged \Deleted \Seen \Draft \*)] Flags permitted.
[11-Sep-2019 11:39:31 +0200]: <ocs3ehrt> [0AD3] S: * 28 EXISTS
[11-Sep-2019 11:39:31 +0200]: <ocs3ehrt> [0AD3] S: * 0 RECENT
[11-Sep-2019 11:39:31 +0200]: <ocs3ehrt> [0AD3] S: * OK [UIDVALIDITY 1550496881] UIDs valid
[11-Sep-2019 11:39:31 +0200]: <ocs3ehrt> [0AD3] S: * OK [UIDNEXT 45] Predicted next UID
[11-Sep-2019 11:39:31 +0200]: <ocs3ehrt> [0AD3] S: * OK [HIGHESTMODSEQ 93] Highest
[11-Sep-2019 11:39:31 +0200]: <ocs3ehrt> [0AD3] S: A0007 OK [READ-WRITE] Select completed (0.000 + 0.000 secs).
[11-Sep-2019 11:39:31 +0200]: <ocs3ehrt> [0AD3] C: A0008 UID SEARCH RETURN (ALL) CHARSET UTF-8 OR HEADER SUBJECT {8+}
[11-Sep-2019 11:39:31 +0200]: <ocs3ehrt> [0AD3] C: končala HEADER FROM {8+}
[11-Sep-2019 11:39:31 +0200]: <ocs3ehrt> [0AD3] C: končala
[11-Sep-2019 11:39:31 +0200]: <ocs3ehrt> [0AD3] S: * ESEARCH (TAG "A0008") UID
[11-Sep-2019 11:39:31 +0200]: <ocs3ehrt> [0AD3] S: A0008 OK Search completed (0.001 + 0.000 secs).
[11-Sep-2019 11:39:31 +0200]: <ocs3ehrt> [0AD3] C: A0009 SELECT "mail/Poslana sporocila"
[11-Sep-2019 11:39:31 +0200]: <ocs3ehrt> [0AD3] S: * OK [CLOSED] Previous mailbox closed.
[11-Sep-2019 11:39:31 +0200]: <ocs3ehrt> [0AD3] S: * FLAGS (\Answered \Flagged \Deleted \Seen \Draft)
[11-Sep-2019 11:39:31 +0200]: <ocs3ehrt> [0AD3] S: * OK [PERMANENTFLAGS (\Answered \Flagged \Deleted \Seen \Draft \*)] Flags permitted.
[11-Sep-2019 11:39:31 +0200]: <ocs3ehrt> [0AD3] S: * 106 EXISTS
[11-Sep-2019 11:39:31 +0200]: <ocs3ehrt> [0AD3] S: * 0 RECENT
[11-Sep-2019 11:39:31 +0200]: <ocs3ehrt> [0AD3] S: * OK [UIDVALIDITY 1550496882] UIDs valid
[11-Sep-2019 11:39:31 +0200]: <ocs3ehrt> [0AD3] S: * OK [UIDNEXT 107] Predicted next UID
[11-Sep-2019 11:39:31 +0200]: <ocs3ehrt> [0AD3] S: * OK [HIGHESTMODSEQ 107] Highest
[11-Sep-2019 11:39:31 +0200]: <ocs3ehrt> [0AD3] S: A0009 OK [READ-WRITE] Select completed (0.000 + 0.000 secs).
[11-Sep-2019 11:39:31 +0200]: <ocs3ehrt> [0AD3] C: A0010 UID SEARCH RETURN (ALL) CHARSET UTF-8 OR HEADER SUBJECT {8+}
[11-Sep-2019 11:39:31 +0200]: <ocs3ehrt> [0AD3] C: končala HEADER FROM {8+}
[11-Sep-2019 11:39:31 +0200]: <ocs3ehrt> [0AD3] C: končala
[11-Sep-2019 11:39:31 +0200]: <ocs3ehrt> [0AD3] S: * ESEARCH (TAG "A0010") UID
[11-Sep-2019 11:39:31 +0200]: <ocs3ehrt> [0AD3] S: A0010 OK Search completed (0.001 + 0.000 secs).
[11-Sep-2019 11:39:31 +0200]: <ocs3ehrt> [0AD3] C: A0011 SELECT mail/Smeti
[11-Sep-2019 11:39:31 +0200]: <ocs3ehrt> [0AD3] S: * OK [CLOSED] Previous mailbox closed.
[11-Sep-2019 11:39:31 +0200]: <ocs3ehrt> [0AD3] S: * FLAGS (\Answered \Flagged \Deleted \Seen \Draft NonJunk)
[11-Sep-2019 11:39:31 +0200]: <ocs3ehrt> [0AD3] S: * OK [PERMANENTFLAGS (\Answered \Flagged \Deleted \Seen \Draft NonJunk \*)] Flags permitted.
[11-Sep-2019 11:39:31 +0200]: <ocs3ehrt> [0AD3] S: * 1 EXISTS
[11-Sep-2019 11:39:31 +0200]: <ocs3ehrt> [0AD3] S: * 0 RECENT
[11-Sep-2019 11:39:31 +0200]: <ocs3ehrt> [0AD3] S: * OK [UIDVALIDITY 1550496883] UIDs valid
[11-Sep-2019 11:39:31 +0200]: <ocs3ehrt> [0AD3] S: * OK [UIDNEXT 2] Predicted next UID
[11-Sep-2019 11:39:31 +0200]: <ocs3ehrt> [0AD3] S: * OK [HIGHESTMODSEQ 3] Highest
[11-Sep-2019 11:39:31 +0200]: <ocs3ehrt> [0AD3] S: A0011 OK [READ-WRITE] Select completed (0.000 + 0.000 secs).
[11-Sep-2019 11:39:31 +0200]: <ocs3ehrt> [0AD3] C: A0012 UID SEARCH RETURN (ALL) CHARSET UTF-8 OR HEADER SUBJECT {8+}
[11-Sep-2019 11:39:31 +0200]: <ocs3ehrt> [0AD3] C: končala HEADER FROM {8+}
[11-Sep-2019 11:39:31 +0200]: <ocs3ehrt> [0AD3] C: končala
[11-Sep-2019 11:39:31 +0200]: <ocs3ehrt> [0AD3] S: * ESEARCH (TAG "A0012") UID
[11-Sep-2019 11:39:31 +0200]: <ocs3ehrt> [0AD3] S: A0012 OK Search completed (0.001 + 0.000 secs).
[11-Sep-2019 11:39:31 +0200]: <ocs3ehrt> [0AD3] C: A0013 SELECT mail/spam
[11-Sep-2019 11:39:31 +0200]: <ocs3ehrt> [0AD3] S: * OK [CLOSED] Previous mailbox closed.
[11-Sep-2019 11:39:31 +0200]: <ocs3ehrt> [0AD3] S: * FLAGS (\Answered \Flagged \Deleted \Seen \Draft Junk NonJunk)
[11-Sep-2019 11:39:31 +0200]: <ocs3ehrt> [0AD3] S: * OK [PERMANENTFLAGS (\Answered \Flagged \Deleted \Seen \Draft Junk NonJunk \*)] Flags permitted.
[11-Sep-2019 11:39:31 +0200]: <ocs3ehrt> [0AD3] S: * 0 EXISTS
[11-Sep-2019 11:39:31 +0200]: <ocs3ehrt> [0AD3] S: * 0 RECENT
[11-Sep-2019 11:39:31 +0200]: <ocs3ehrt> [0AD3] S: * OK [UIDVALIDITY 1550496880] UIDs valid
[11-Sep-2019 11:39:31 +0200]: <ocs3ehrt> [0AD3] S: * OK [UIDNEXT 30] Predicted next UID
[11-Sep-2019 11:39:31 +0200]: <ocs3ehrt> [0AD3] S: * OK [HIGHESTMODSEQ 84] Highest
[11-Sep-2019 11:39:31 +0200]: <ocs3ehrt> [0AD3] S: A0013 OK [READ-WRITE] Select completed (0.000 + 0.000 secs).
[11-Sep-2019 11:39:31 +0200]: <ocs3ehrt> [0AD3] C: A0014 SELECT Trash
[11-Sep-2019 11:39:31 +0200]: <ocs3ehrt> [0AD3] S: * OK [CLOSED] Previous mailbox closed.
[11-Sep-2019 11:39:31 +0200]: <ocs3ehrt> [0AD3] S: * FLAGS (\Answered \Flagged \Deleted \Seen \Draft)
[11-Sep-2019 11:39:31 +0200]: <ocs3ehrt> [0AD3] S: * OK [PERMANENTFLAGS (\Answered \Flagged \Deleted \Seen \Draft \*)] Flags permitted.
[11-Sep-2019 11:39:31 +0200]: <ocs3ehrt> [0AD3] S: * 0 EXISTS
[11-Sep-2019 11:39:31 +0200]: <ocs3ehrt> [0AD3] S: * 0 RECENT
[11-Sep-2019 11:39:31 +0200]: <ocs3ehrt> [0AD3] S: * OK [UIDVALIDITY 1550496888] UIDs valid
[11-Sep-2019 11:39:31 +0200]: <ocs3ehrt> [0AD3] S: * OK [UIDNEXT 1] Predicted next UID
[11-Sep-2019 11:39:31 +0200]: <ocs3ehrt> [0AD3] S: * OK [HIGHESTMODSEQ 1] Highest
[11-Sep-2019 11:39:31 +0200]: <ocs3ehrt> [0AD3] S: A0014 OK [READ-WRITE] Select completed (0.000 + 0.000 secs).
[11-Sep-2019 11:39:31 +0200]: <ocs3ehrt> [0AD3] C: A0015 GETQUOTAROOT INBOX
[11-Sep-2019 11:39:31 +0200]: <ocs3ehrt> [0AD3] S: * QUOTAROOT INBOX "User quota"
[11-Sep-2019 11:39:31 +0200]: <ocs3ehrt> [0AD3] S: * QUOTA "User quota" (STORAGE 633413 20971520)
[11-Sep-2019 11:39:31 +0200]: <ocs3ehrt> [0AD3] S: A0015 OK Getquotaroot completed (0.000 + 0.000 secs).
[11-Sep-2019 11:39:31 +0200]: <ocs3ehrt> [0AD3] C: A0016 LOGOUT
[11-Sep-2019 11:39:31 +0200]: <ocs3ehrt> [0AD3] S: * BYE Logging out
[11-Sep-2019 11:39:31 +0200]: <ocs3ehrt> [0AD3] S: A0016 OK Logout completed.

@alecpl
Copy link
Member

alecpl commented Sep 12, 2019

So, every folder is asked for

UID SEARCH RETURN (ALL) CHARSET UTF-8 OR HEADER SUBJECT {8+}
končala HEADER FROM {8+}
končala

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?

@johndoh
Copy link
Contributor

johndoh commented Sep 12, 2019

@alecpl I think I know what they did. Try these steps (in git-master, elastic skin)

  1. do a search in "all folders" with only the "subject" selected
  2. now do a search in "current folder" with "entire message" selected
  3. now change the scope to "all folders" but do not change anything else and click search.

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.

@rokj
Copy link
Contributor Author

rokj commented Sep 12, 2019

Yeah, something like John described:
https://www.youtube.com/watch?v=hKT4eHnWNgo

@alecpl alecpl added this to the 1.4.0 milestone Sep 12, 2019
@alecpl
Copy link
Member

alecpl commented Sep 13, 2019

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 (search_mods).

I see two options to fix this:

  1. Always use current (folder) search fields. Get rid of search_mods['*'].
  2. Reset fields to current search_mods value when changing the scope (and probably also do not restart the search automatically).

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 alecpl changed the title Searching in all folders does not work Changing search scope does not reset selected search fields (search_mods) Sep 13, 2019
@thomascube
Copy link
Member

@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.

@alecpl
Copy link
Member

alecpl commented Oct 1, 2019

@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.

@thomascube
Copy link
Member

An obvious solution would be to not restart the search automatically.

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).

@alecpl
Copy link
Member

alecpl commented Oct 1, 2019

An obvious solution would be to not restart the search automatically.

That's certainly a good idea and would likely avoid some of the confusion.

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?).

In Elastic the search form is completely reset when switching folders, including the search field is cleared. That I find annoying.

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.

@alecpl alecpl modified the milestones: 1.4.0, 1.4.1 Oct 27, 2019
@alecpl alecpl modified the milestones: 1.4.1, 1.4.2 Nov 13, 2019
@alecpl alecpl modified the milestones: 1.4.2, later Dec 15, 2019
@alecpl
Copy link
Member

alecpl commented Mar 14, 2021

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 search_mods[*] should not be used for "all folders" search, as this wasn't the intention. Considering everything that has been said in this ticket, I think the solution should be:

  1. Do not auto-execute search on scope change (Elastic does it this way)
  2. Use currently selected criteria instead of the criteria defined in search_mods[*].

@alecpl alecpl modified the milestones: later, 1.5-rc Mar 14, 2021
alecpl added a commit that referenced this issue Apr 4, 2021
- Don't start search on initerval and scope search
- Use currently selected criteria instead of the criteria defined in search_mods[*]
@alecpl
Copy link
Member

alecpl commented Apr 4, 2021

Fixed.

@alecpl alecpl closed this as completed Apr 4, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants