"Age in days" search should default to "is less than"

RESOLVED FIXED

Status

SeaMonkey
MailNews: Message Display
--
enhancement
RESOLVED FIXED
15 years ago
8 years ago

People

(Reporter: Jesse Ruderman, Assigned: neil@parkwaycc.co.uk)

Tracking

({fixed-seamonkey2.0})

Trunk
x86
Windows XP
fixed-seamonkey2.0
Dependency tree / graph
Bug Flags:
wanted-seamonkey2.0 +

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(2 attachments)

(Reporter)

Description

15 years ago
Steps to reproduce:
1. In Mail, bring up a Search window.
2. Select the "Age In Days" criterion.

Result:   [Age in days|v] [is              |v] [            ]
Expected: [Age in days|v] [is less than    |v] [            ]

Why should the default be "is less than"?

* It's more common that I don't know the exact age in days, especially when I
know so little about the message I'm searching for that I have to include an
"age in days" criterion.

* I don't know whether Mozilla Mail calculates the integer "age in days" by
counting the number of midnights, taking the floor of the exact age in days, or
some other method.  With an "is less than" search, I don't have to worry about
exactly what "age in days" means.

* If I know the exact age in days, the message was probably sent to me very
recently, so the number of days is so small that including newer messages in the
search doesn't hurt.

Updated

15 years ago
Severity: minor → enhancement
mass re-assign.
Assignee: naving → sspitzer
Product: Browser → Seamonkey

Updated

13 years ago
Assignee: sspitzer → mail

Updated

10 years ago
Component: MailNews: Search → MailNews: Message Display
QA Contact: laurel → search

Comment 2

9 years ago
MASS-CHANGE:
This bug report is registered in the SeaMonkey product, but has been without a comment since the inception of the SeaMonkey project. This means that it was logged against the old Mozilla suite and we cannot determine that it's still valid for the current SeaMonkey suite. Because of this, we are setting it to an UNCONFIRMED state.

If you can confirm that this report still applies to current SeaMonkey 2.x nightly builds, please set it back to the NEW state along with a comment on how you reproduced it on what Build ID, or if it's an enhancement request, why it's still worth implementing and in what way.
If you can confirm that the report doesn't apply to current SeaMonkey 2.x nightly builds, please set it to the appropriate RESOLVED state (WORKSFORME, INVALID, WONTFIX, or similar).
If no action happens within the next few months, we move this bug report to an EXPIRED state.

Query tag for this change: mass-UNCONFIRM-20090614
Status: NEW → UNCONFIRMED

Comment 3

9 years ago
MASS-CHANGE:
This bug report is registered in the SeaMonkey product, but has been without a comment since the inception of the SeaMonkey project. This means that it was logged against the old Mozilla suite and we cannot determine that it's still valid for the current SeaMonkey suite. Because of this, we are setting it to an UNCONFIRMED state.

If you can confirm that this report still applies to current SeaMonkey 2.x nightly builds, please set it back to the NEW state along with a comment on how you reproduced it on what Build ID, or if it's an enhancement request, why it's still worth implementing and in what way.
If you can confirm that the report doesn't apply to current SeaMonkey 2.x nightly builds, please set it to the appropriate RESOLVED state (WORKSFORME, INVALID, WONTFIX, or similar).
If no action happens within the next few months, we move this bug report to an EXPIRED state.

Query tag for this change: mass-UNCONFIRM-20090614

Comment 4

9 years ago
MASS-CHANGE:
This bug report is registered in the SeaMonkey product, but has been without a comment since the inception of the SeaMonkey project. This means that it was logged against the old Mozilla suite and we cannot determine that it's still valid for the current SeaMonkey suite. Because of this, we are setting it to an UNCONFIRMED state.

If you can confirm that this report still applies to current SeaMonkey 2.x nightly builds, please set it back to the NEW state along with a comment on how you reproduced it on what Build ID, or if it's an enhancement request, why it's still worth implementing and in what way.
If you can confirm that the report doesn't apply to current SeaMonkey 2.x nightly builds, please set it to the appropriate RESOLVED state (WORKSFORME, INVALID, WONTFIX, or similar).
If no action happens within the next few months, we move this bug report to an EXPIRED state.

Query tag for this change: mass-UNCONFIRM-20090614
Assignee: mail → nobody
QA Contact: search → message-display
Still present in the current builds. (Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; en-US; rv:1.9.1pre) Gecko/20090615 Shredder/3.0b3pre)

Marking NEW.
Status: UNCONFIRMED → NEW

Comment 6

9 years ago
Karsten, do we have plans to fix this in SeaMonkey or this this a WONTFIX?

Alex, I don't care what Shredder does or not when this is filed in the SeaMonkey product.

Comment 7

9 years ago
The current default is pretty useless - fix wanted! :)
Flags: wanted-seamonkey2+
Whiteboard: [good first bug]
(Assignee)

Comment 8

8 years ago
Created attachment 403256 [details] [diff] [review]
Gross hack

The validity table is an unordered set and the manager always returns the valid operators in numeric order so that we can't directly control which the first and therefore default element in the menulist is. Instead this patch hacks around it by selecting the desired entry after (re)building the menulist.
Assignee: nobody → neil
Status: NEW → ASSIGNED
Attachment #403256 - Flags: review?(mnyromyr)

Updated

8 years ago
Attachment #403256 - Flags: review?(mnyromyr) → review+

Comment 9

8 years ago
Comment on attachment 403256 [details] [diff] [review]
Gross hack

>             if (this.searchAttribute == val && val != Components.interfaces.nsMsgSearchAttrib.OtherHeader) return val;
>             this.searchAttribute = val;
>             this.refreshList(true); // don't restore the selection, since searchvalue nulls it
>+            if (val == Components.interfaces.nsMsgSearchAttrib.AgeInDays)
>+            {
>+              // Bug 187741 We want "Age in Days" to default to "is less than".
>+              var menulist = document.getAnonymousNodes(this)[0];
>+              menulist.value = Components.interfaces.nsMsgSearchOp.IsLessThan;
>+            }
>             if (val == Components.interfaces.nsMsgSearchAttrib.OtherHeader)

I'd be amazed id val becomes OtherHeader right after it has been AgeInDays. ;-)
Use a switch or an else (I'm less inclined to an early return here).


r/moa=me with that.
(Assignee)

Comment 10

8 years ago
Created attachment 403895 [details] [diff] [review]
Addressed review comment
Attachment #403895 - Flags: review+
Attachment #403895 - Flags: approval-seamonkey2.0?

Updated

8 years ago
Attachment #403895 - Flags: approval-seamonkey2.0? → approval-seamonkey2.0+
(Assignee)

Comment 11

8 years ago
Pushed changeset c0b232751743 to comm-central.
Status: ASSIGNED → RESOLVED
Last Resolved: 8 years ago
Keywords: fixed-seamonkey2.0
Resolution: --- → FIXED
Whiteboard: [good first bug]

Updated

8 years ago
Depends on: 530406
You need to log in before you can comment on or make changes to this bug.