Closed
Bug 238352
Opened 22 years ago
Closed 22 years ago
Sorting in reports makes them unclear
Categories
(Bugzilla :: Reporting/Charting, defect)
Tracking
()
RESOLVED
FIXED
Bugzilla 2.18
People
(Reporter: gerv, Assigned: gerv)
Details
Attachments
(1 file, 1 obsolete file)
|
3.29 KB,
patch
|
kiko
:
review+
|
Details | Diff | Splinter Review |
Reports currently display rows and columns in sorted order. This rather sucks.
For example, you get:
blocker critical enhancement major minor normal trivial
when you should get:
enhancement trivial minor normal major critical blocker
Gerv
| Assignee | ||
Comment 1•22 years ago
|
||
This change preserves the standard ordering for priority, severity, platform,
OS, status and resolution.
Gerv
| Assignee | ||
Comment 2•22 years ago
|
||
Comment on attachment 144614 [details] [diff] [review]
Patch v.1
Joel: you've reviewed reporting fixes in the past. Any chance you could take a
stab at this one?
Thanks,
Gerv
Attachment #144614 -
Flags: review?(bugreport)
Comment 3•22 years ago
|
||
Comment on attachment 144614 [details] [diff] [review]
Patch v.1
>Index: report.cgi
>+my @col_names = @{get_names($names{"col"}, $col_isnumeric, $col_field)};
I am curious; why do we need the @{...} around get_names? Doesn't get_names
return a reference to a new array (produced by keps or lsearch) anyway?
>+sub get_names {
>+ my ($names, $isnumeric, $field) = @_;
>+
>+ my @unsorted = keys %{$names};
>+ my @sorted;
nits:
- move unsorted into the branch where it's used (it's only used in the first
branch)
- move sorted to right before the if () statement
>+ @sorted = map {lsearch(\@unsorted, $_) == -1 ? () : $_} @{$field_list};
Hmmm, I wonder if there isn't a simpler way to check if an item is in an array?
Comment 4•22 years ago
|
||
(In reply to comment #3)
> (From update of attachment 144614 [details] [diff] [review])
> >Index: report.cgi
> >+my @col_names = @{get_names($names{"col"}, $col_isnumeric, $col_field)};
>
> I am curious; why do we need the @{...} around get_names? Doesn't get_names
> return a reference to a new array (produced by keps or lsearch) anyway?
Exactly, which is why it needs the @{} to dereference it, since the variable
you're sticking it in is actually an array and not an array reference.
| Assignee | ||
Comment 5•22 years ago
|
||
Fixed Kiko's points.
Gerv
Attachment #144614 -
Attachment is obsolete: true
| Assignee | ||
Updated•22 years ago
|
Attachment #144907 -
Flags: review?(kiko)
Comment 6•22 years ago
|
||
Comment on attachment 144907 [details] [diff] [review]
Patch v.2
Looks good.
Attachment #144907 -
Flags: review?(kiko) → review+
Updated•22 years ago
|
Attachment #144614 -
Flags: review?(bugreport)
| Assignee | ||
Updated•22 years ago
|
Flags: approval?
Updated•22 years ago
|
Flags: approval? → approval+
Updated•22 years ago
|
Target Milestone: --- → Bugzilla 2.18
| Assignee | ||
Comment 7•22 years ago
|
||
Fixed. Thanks to kiko for reviewing :-)
Checking in report.cgi;
/cvsroot/mozilla/webtools/bugzilla/report.cgi,v <-- report.cgi
new revision: 1.23; previous revision: 1.22
done
Gerv
Status: NEW → RESOLVED
Closed: 22 years ago
Resolution: --- → FIXED
Updated•13 years ago
|
QA Contact: matty_is_a_geek → default-qa
You need to log in
before you can comment on or make changes to this bug.
Description
•