Closed
Bug 870282
Opened 11 years ago
Closed 11 years ago
Searching by "Priority" is missing an "Isn't" operator
Categories
(MailNews Core :: Search, defect)
MailNews Core
Search
Tracking
(Not tracked)
RESOLVED
FIXED
Thunderbird 24.0
People
(Reporter: aceman, Assigned: sshagarwal)
Details
(Whiteboard: [good first bug][mentor=aceman][lang=c++])
Attachments
(1 file, 2 obsolete files)
10.39 KB,
patch
|
sshagarwal
:
review+
aceman
:
feedback+
|
Details | Diff | Splinter Review |
If searching messages by the Priority field, the available operators are "Is", "Is Lower than", "Is Higher than". There is no "Isn't" operator. The use-case could be: Search all messages where Priority isn't Normal. It is currently possible to simulate that via "(Priority, is higher than, Normal) OR (Priority, is lower than, Normal)", but that forces the OR operator on all other search terms in the same search (or filter). So this operator needs to be added to: nsMsgSearchTerm.cpp > nsMsgSearchTerm::MatchPriority and: mailnews/base/search/src/nsMsgImapSearch.cpp (in the lines like: "SetAvailable (nsMsgSearchAttrib::Priority, nsMsgSearchOp::Is, 1);") . It seems the UI picks it up from there.
Assignee | ||
Comment 1•11 years ago
|
||
Sir, I have tried to make the changes as per the description.
Attachment #747970 -
Flags: review?(kent)
Attachment #747970 -
Flags: feedback?(acelists)
Comment 2•11 years ago
|
||
Could you add a test for this new attribute in mailnews/base/test/unit/test_search.js?
Assignee | ||
Comment 3•11 years ago
|
||
Sir, I have added the test.
Attachment #747970 -
Attachment is obsolete: true
Attachment #747970 -
Flags: review?(kent)
Attachment #747970 -
Flags: feedback?(acelists)
Attachment #748229 -
Flags: review?(kent)
Attachment #748229 -
Flags: feedback?(acelists)
Comment on attachment 748229 [details] [diff] [review] Patch v2 The change and the test works great! Thanks.
Attachment #748229 -
Flags: feedback?(acelists) → feedback+
Comment 5•11 years ago
|
||
Comment on attachment 748229 [details] [diff] [review] Patch v2 Review of attachment 748229 [details] [diff] [review]: ----------------------------------------------------------------- Overall, looks good and great job. Please just fix the one nit. ::: mailnews/base/test/unit/test_search.js @@ +207,5 @@ > customHeader: "withspace", > count: 1}, > + > + //test for priority > + { testString: Components.interfaces.nsMsgPriority.lowest, Nit: In xpcshell tests, standard abbreviations are predefined, and should be used. So please change these five instances of Components.interfaces. to Ci.
Attachment #748229 -
Flags: review?(kent) → review+
Assignee | ||
Comment 6•11 years ago
|
||
Attachment #749207 -
Flags: review+
Attachment #749207 -
Flags: feedback?(acelists)
Assignee | ||
Comment 7•11 years ago
|
||
Sir, Thanks for your review and feedback. I have made the changes. Carrying over review from rkent.
Assignee | ||
Updated•11 years ago
|
Attachment #748229 -
Attachment is obsolete: true
Comment on attachment 749207 [details] [diff] [review] Patch v2 (revised) Yes, that's it.
Attachment #749207 -
Flags: feedback?(acelists) → feedback+
Congratulations to your first user visible change in TB and Seamonkey:)
Keywords: checkin-needed
Comment 10•11 years ago
|
||
https://hg.mozilla.org/comm-central/rev/e232ca630f82
Status: ASSIGNED → RESOLVED
Closed: 11 years ago
Flags: in-testsuite+
Keywords: checkin-needed
Resolution: --- → FIXED
Target Milestone: --- → Thunderbird 24.0
You need to log in
before you can comment on or make changes to this bug.
Description
•