Closed Bug 187741 Opened 22 years ago Closed 15 years ago

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

Categories

(SeaMonkey :: MailNews: Message Display, enhancement)

x86
Windows XP
enhancement
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: jruderman, Assigned: neil)

References

Details

(Keywords: fixed-seamonkey2.0)

Attachments

(2 files)

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.
Severity: minor → enhancement
mass re-assign.
Assignee: naving → sspitzer
Product: Browser → Seamonkey
Assignee: sspitzer → mail
Component: MailNews: Search → MailNews: Message Display
QA Contact: laurel → search
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
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
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
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.
The current default is pretty useless - fix wanted! :)
Flags: wanted-seamonkey2+
Whiteboard: [good first bug]
Attached patch Gross hackSplinter Review
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)
Attachment #403256 - Flags: review?(mnyromyr) → review+
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.
Attachment #403895 - Flags: review+
Attachment #403895 - Flags: approval-seamonkey2.0?
Attachment #403895 - Flags: approval-seamonkey2.0? → approval-seamonkey2.0+
Pushed changeset c0b232751743 to comm-central.
Status: ASSIGNED → RESOLVED
Closed: 15 years ago
Resolution: --- → FIXED
Whiteboard: [good first bug]
Depends on: 530406
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: