Closed Bug 1664761 Opened 4 years ago Closed 4 years ago

Search Messages (Ctrl+Shift+F) from Gloda Search results fails. Error gCurrentFolder is null in SearchDialog.js

Categories

(Thunderbird :: Search, defect)

defect

Tracking

(thunderbird_esr68 wontfix, thunderbird_esr78+ fixed, thunderbird83 wontfix)

RESOLVED FIXED
83 Branch
Tracking Status
thunderbird_esr68 --- wontfix
thunderbird_esr78 + fixed
thunderbird83 --- wontfix

People

(Reporter: nONoNonO, Assigned: lasana)

Details

Attachments

(4 files)

Search for a message using Ctrl+K and select a message from the global search results. A new tab opens with the selected thread or message.
Now press Ctrl+Shift+F or use menu Edit > Find > Search Messages.
The Search Messages window opens, but no folder is selected and there are no buttons to add/remove search criteria.
The error console shows error gCurrentFolder is null (SearchDialog.js:334:7).

Assignee: nobody → lasana
Status: UNCONFIRMED → NEW
Ever confirmed: true

Reproduces in 78.
See also bug 1248522

Severity: -- → S3
Summary: Search Messages (Ctrl+Shift+F) from Gloda Search results fails → Search Messages (Ctrl+Shift+F) from Gloda Search results fails. Error gCurrentFolder is null in SearchDialog.js
Status: NEW → ASSIGNED
Attached patch 1664761.patchSplinter Review

When in a synthetic view, displayedFolder is null. This patch uses gFolderTreeView.getSelectedFolders() to select the first folder for the search dialog. It does not look like that dialog is meant to work without a folder being specified.

Attachment #9181823 - Flags: review?(mkmelin+mozilla)
Comment on attachment 9181823 [details] [diff] [review] 1664761.patch Review of attachment 9181823 [details] [diff] [review]: ----------------------------------------------------------------- Thx! r=mkmelin
Attachment #9181823 - Flags: review?(mkmelin+mozilla) → review+
Target Milestone: --- → 83 Branch

Pushed by mkmelin@iki.fi:
https://hg.mozilla.org/comm-central/rev/7f34ae3f49ed
Use a selected folder when opening the search dialog from a synthetic view. r=mkmelin

Status: ASSIGNED → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED

Comment on attachment 9181823 [details] [diff] [review]
1664761.patch

[Approval Request Comment]
User impact if declined: per bug summary
Testing completed (on c-c, etc.): on beta
Risk to taking this patch (and alternatives if risky): covered by test

Attachment #9181823 - Flags: approval-comm-esr78?

Comment on attachment 9181823 [details] [diff] [review]
1664761.patch

[Triage Comment]
Approved for esr78

Attachment #9181823 - Flags: approval-comm-esr78? → approval-comm-esr78+

This patch causes test failures on all platforms on esr78 (78.4.1). The issue is in the test itself. folder.deleteSelf() from bug 1612239 did not land in comm-central until 2020-09-18. That bug can't be uplifted, can you adjust the test?

Flags: needinfo?(mkmelin+mozilla)
Flags: needinfo?(lasana)

Instead of folder.deleteSelf() for 78 it should be

folder.parent.deleteSubFolders(	
    toXPCOMArray([folder], Ci.nsIMutableArray),	
    null	
  );
Flags: needinfo?(mkmelin+mozilla)
Attached patch bug1664761.patchSplinter Review

Here is an updated version of the patch for esr-78.

Flags: needinfo?(lasana)
Attachment #9185728 - Flags: review?(mkmelin+mozilla)

Couldn't get an artifact build locally to test this but pushed something to the try server here:
https://treeherder.mozilla.org/jobs?repo=try-comm-central&revision=0c04ab287a6fa88f8c3abebd594b834d5e195df5

Comment on attachment 9185728 [details] [diff] [review] bug1664761.patch Review of attachment 9185728 [details] [diff] [review]: ----------------------------------------------------------------- Didn't test it but looks ok to me.
Attachment #9185728 - Flags: review?(mkmelin+mozilla) → review+
Attachment #9181823 - Flags: approval-comm-esr78+

Comment on attachment 9185728 [details] [diff] [review]
bug1664761.patch

[Triage Comment]
Rebased version of previously approved uplift to work around lack of folder.selfDelete.

Attachment #9185728 - Flags: approval-comm-esr78+
Attached image image.png

Yup, should have made sure that the tests ran.

You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: