Closed
Bug 791554
Opened 13 years ago
Closed 13 years ago
sort key description on editflagtypes.cgi is wrong as per the error message
Categories
(Bugzilla :: Administration, task)
Tracking
()
RESOLVED
FIXED
Bugzilla 5.0
People
(Reporter: sjoshi, Assigned: sjoshi)
Details
Attachments
(1 file, 2 obsolete files)
|
957 bytes,
patch
|
LpSolit
:
review+
|
Details | Diff | Splinter Review |
User Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:15.0) Gecko/20100101 Firefox/15.0
Build ID: 20120814224555
Steps to reproduce:
Tried to create flag type, with 0(Zero) sort key.
Actual results:
Flag type got created.
but messages displays,
Sort Key: a number between 1 and 32767 by which this type will be sorted when displayed to users in a list .....
Or if we give invalid sortkey other than 0<= Sortkey<= 32767 , it displays error
"The sort key must be an integer between 0 and 32767."
Expected results:
Message should be a number between 0 and 32767 ... not here 0 not 1
Updated•13 years ago
|
Assignee: ui → administration
Severity: normal → trivial
Status: UNCONFIRMED → NEW
Component: User Interface → Administration
Ever confirmed: true
| Assignee | ||
Comment 1•13 years ago
|
||
Attachment #661621 -
Flags: review?(LpSolit)
| Assignee | ||
Comment 2•13 years ago
|
||
This patch also fixes the issue that when we create a flag type with sortkey as 0(zero) value and edit that flagtype again. On edit editflagtypes.cgi sortkey displays as 1 and not 0(zero)
Attachment #661621 -
Attachment is obsolete: true
Attachment #661621 -
Flags: review?(LpSolit)
Attachment #661838 -
Flags: review?(LpSolit)
Comment 3•13 years ago
|
||
Comment on attachment 661838 [details] [diff] [review]
Re-Patch
>- <input type="text" name="sortkey" value="[% type.sortkey || 1 %]" size="5" maxlength="5"
>+ <input type="text" name="sortkey" value="[% type.sortkey.defined ? type.sortkey : 1 %]" size="5" maxlength="5"
If 0 is legal, then let's default to it. This way you simply need to write || 0. .defined requires TT 2.24.
Attachment #661838 -
Flags: review?(LpSolit) → review-
Updated•13 years ago
|
Assignee: administration → joshi_sunil
Status: NEW → ASSIGNED
Target Milestone: --- → Bugzilla 5.0
| Assignee | ||
Comment 4•13 years ago
|
||
(In reply to Frédéric Buclin from comment #3)
> Comment on attachment 661838 [details] [diff] [review]
> Re-Patch
>
> >- <input type="text" name="sortkey" value="[% type.sortkey || 1 %]" size="5" maxlength="5"
> >+ <input type="text" name="sortkey" value="[% type.sortkey.defined ? type.sortkey : 1 %]" size="5" maxlength="5"
>
> If 0 is legal, then let's default to it. This way you simply need to write
> || 0. .defined requires TT 2.24.
LpSolit: I have asked you the same thing in #bugzilla, you said no need to change the default value.So i kept it 1 only,
Although I am not sure on this,but .defined is already being used in "template\en\default\admin\flag-type\edit.html.tmpl" so I preferred using that.
Anyways, I have made the required changes as suggested by you.
Attachment #661838 -
Attachment is obsolete: true
Attachment #663270 -
Flags: review?(LpSolit)
Comment 5•13 years ago
|
||
Comment on attachment 663270 [details] [diff] [review]
Patch
You must also fix filterexceptions.pl, else 008filter.t is going to complain. r=LpSolit with this fix.
Attachment #663270 -
Flags: review?(LpSolit) → review+
Updated•13 years ago
|
Flags: approval+
Comment 6•13 years ago
|
||
Committing to: bzr+ssh://lpsolit%40gmail.com@bzr.mozilla.org/bugzilla/trunk/
modified template/en/default/filterexceptions.pl
modified template/en/default/admin/flag-type/edit.html.tmpl
Committed revision 8425.
Status: ASSIGNED → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•