Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
bugzilla
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
etersoft
bugzilla
Commits
ea25c5cf
Commit
ea25c5cf
authored
Aug 26, 2015
by
Frédéric Buclin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Bug 1198659: Custom fields of type INTEGER should accept negative integers
r=gerv a=sgreen
parent
7d3c1b0d
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
2 deletions
+5
-2
Bug.pm
Bugzilla/Bug.pm
+1
-1
field.html.tmpl
template/en/default/bug/field.html.tmpl
+4
-1
No files found.
Bugzilla/Bug.pm
View file @
ea25c5cf
...
...
@@ -2259,7 +2259,7 @@ sub _check_integer_field {
ThrowUserError
(
"number_not_integer"
,
{
field
=>
$field
,
num
=>
$orig_value
});
}
elsif
(
$value
>
MAX_INT_32
)
{
elsif
(
abs
(
$value
)
>
MAX_INT_32
)
{
ThrowUserError
(
"number_too_large"
,
{
field
=>
$field
,
num
=>
$orig_value
,
max_num
=>
MAX_INT_32
});
}
...
...
template/en/default/bug/field.html.tmpl
View file @
ea25c5cf
...
...
@@ -42,7 +42,10 @@
name="[% field.name FILTER html %]"
value="[% value FILTER html %]" size="40"
maxlength="[% constants.MAX_FREETEXT_LENGTH FILTER none %]"
[% IF field.type == constants.FIELD_TYPE_INTEGER %] pattern="\d+[% IF dontchange %]|[% dontchange FILTER html %][% END %]" [% END %]
[% IF field.type == constants.FIELD_TYPE_INTEGER %]
pattern="-?\d+[% IF dontchange %]|[% dontchange FILTER html %][% END %]"
title="The value must be a valid positive or negative integer"
[% END %]
[% IF field.is_mandatory %]
data-required="true" [% 'aria-required="true" required' UNLESS field_hidden %]
[% END %]>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment