6.0.0-beta1
7/20/25

[#6921] Change Search UI screen to search by KB instead of bytes
Summary Change Search UI screen to search by KB instead of bytes
Queue IMP
Queue Version HEAD
Type Enhancement
State Resolved
Priority 1. Low
Owners slusarz (at) horde (dot) org
Requester slusarz (at) horde (dot) org
Created 06/13/2008 (6246 days ago)
Due
Updated 07/19/2008 (6210 days ago)
Assigned
Resolved 07/19/2008 (6210 days ago)
Milestone
Patch No

History
07/19/2008 09:35:26 PM Michael Slusarz Comment #6
State ⇒ Resolved
Reply to this comment
Resolving for now.
07/16/2008 08:38:38 AM Jan Schneider Comment #5
Taken from Horde DevelopersHorde Developers
Taken from Jan Schneider
Reply to this comment
Looks and works fine.
07/16/2008 06:27:01 AM Michael Slusarz Comment #3
State ⇒ Feedback
Reply to this comment
Changed display to KB instead of bytes.  Further testing would be great.
06/13/2008 06:46:16 PM Michael Slusarz Comment #1
Priority ⇒ 1. Low
Type ⇒ Enhancement
Summary ⇒ Change Search UI screen to search by KB instead of bytes
Queue ⇒ IMP
Assigned to Jan Schneider
Assigned to Michael Slusarz
Assigned to Horde DevelopersHorde Developers
Milestone ⇒
Patch ⇒ No
State ⇒ Assigned
Reply to this comment
A better idea would be to add a dropdown list MB, KB, Byte and the

value in the field would automatically multipled by the selected

setting - this way you are not limiting yourself to a specific range

if you search by byte count internally already



Agreed - changing this to search for KB (or MB) will break all current

virtual folders unless some kind of in-place updating of preference

data is done.



Why? All you have to do is to calculate to bytes before storing it in

the virtual folder preference, and the opposite when reading it.



How do you tell whether the the previous search was in bytes, KB, or

MB? (I would not agree on any change that would simply make KB the

default - I think bytes makes more sense as a default than KB).

Scenario:



1. User searches for something in KB.

2. Search returns no result.

3. When search is reloaded, his search will be displayed in bytes, not KB.



Although not incorrect behavior, it probably isn't the expected

behavior.  Additionally, the textified representations of the search

will be incorrect also.  Thus the need to alter the stored virtual

folder value in someway to indicate the search type.



I think it's safe to assume that the user entered the lowest number

possible with the units available. Thus we can calculate back from the

bytes to largest unit possible without loss. We do something similar

in Kronolith when calculating alarms (saved in minutes) to hours and

days.



E.g. the user enter 2 KB, we save 2048. When displaying the value

again, we see that we can divide by 1024 without loss. If he entered

2000 bytes instead, we would display 2000 bytes.

Saved Queries