Closed
Bug 621255
Opened 15 years ago
Closed 15 years ago
Params without a sortkey should sort to the end
Categories
(Bugzilla :: Administration, task)
Tracking
()
RESOLVED
FIXED
Bugzilla 4.2
People
(Reporter: gerv, Assigned: gerv)
Details
Attachments
(1 file, 1 obsolete file)
966 bytes,
patch
|
dkl
:
review+
|
Details | Diff | Splinter Review |
Currently, if you add a new param panel and don't specify a sortkey, it sorts to the top, between Index and Required Settings. I suspect that is almost never the desired behaviour. It would be better if the default were to sort to the end.
Gerv
Assignee | ||
Comment 1•15 years ago
|
||
Assignee: administration → gerv
Attachment #499617 -
Flags: review?(mkanat)
Comment 2•15 years ago
|
||
(In reply to comment #1)
> Created attachment 499617 [details] [diff] [review]
> Patch v.1
Gerv, this looks good and worked for me for the most part. The only issue I have with it is when someone has $sortkey set to 0 in their Config.pm meaning they want the menu item to display at the "top" of the list. With this patch it will still display at the bottom. Is it possible for your patch to check for defined instead of a 0 or false value?
Dave
Assignee | ||
Comment 3•15 years ago
|
||
Good catch. Try this instead.
Gerv
Attachment #499617 -
Attachment is obsolete: true
Attachment #500185 -
Flags: review?(dkl)
Attachment #499617 -
Flags: review?(mkanat)
Comment 4•15 years ago
|
||
Comment on attachment 500185 [details] [diff] [review]
Patch v.2
Works for me. r=dkl
Attachment #500185 -
Flags: review?(dkl) → review+
Updated•15 years ago
|
Flags: approval?
Flags: approval4.0?
![]() |
||
Comment 5•15 years ago
|
||
Comment on attachment 500185 [details] [diff] [review]
Patch v.2
>+ defined($item->{'sortkey'}) || ($item->{'sortkey'} = 100000);
This would be much clearer as $item->{sortkey} ||= 100000 as we have no sortkey = 0.
![]() |
||
Comment 7•15 years ago
|
||
(In reply to comment #2)
> Gerv, this looks good and worked for me for the most part. The only issue I
> have with it is when someone has $sortkey set to 0 in their Config.pm meaning
> they want the menu item to display at the "top" of the list.
We have no such sortkey.
![]() |
||
Comment 8•15 years ago
|
||
(In reply to comment #6)
> LpSolit: so are you disagreeing with comment 2?
Yes.
Assignee | ||
Comment 9•15 years ago
|
||
Comment on attachment 499617 [details] [diff] [review]
Patch v.1
OK, back to plan A.
Gerv
Attachment #499617 -
Attachment is obsolete: false
Attachment #499617 -
Flags: review?(dkl)
Assignee | ||
Updated•15 years ago
|
Attachment #500185 -
Attachment is obsolete: true
Comment 10•15 years ago
|
||
Comment on attachment 499617 [details] [diff] [review]
Patch v.1
Well is LpSolit says that extensions should never need to have a $sortkey equal to 0 (which I am not so sure), then this works fine for me. r=dkl
Attachment #499617 -
Flags: review?(dkl) → review+
![]() |
||
Comment 11•15 years ago
|
||
(In reply to comment #10)
> Well is LpSolit says that extensions should never need to have a $sortkey equal
> to 0 (which I am not so sure), then this works fine for me. r=dkl
Sortkeys are currently hardcoded and none is 0. Also, we never guaranteed that a "false" sortkey (from a Perl point of view, i.e. undef, "" or 0) would be treated correctly. So I much prefer to enforce this rule than to get unexpected behaviors.
![]() |
||
Updated•15 years ago
|
Severity: minor → enhancement
Flags: approval?
Flags: approval4.0?
Flags: approval4.0-
Flags: approval+
Target Milestone: --- → Bugzilla 4.2
Assignee | ||
Comment 12•15 years ago
|
||
Committing to: bzr+ssh://bzr.mozilla.org/bugzilla/trunk/
modified editparams.cgi
Committed revision 7677.
Gerv
Status: ASSIGNED → RESOLVED
Closed: 15 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•