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
d7447bf9
Commit
d7447bf9
authored
May 10, 2006
by
mkanat%bugzilla.org
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Bug 96431: It's possible to write an essay in the Summary field.
Patch By Max Kanat-Alexander <mkanat@bugzilla.org> r=LpSolit, a=myk
parent
a6b4362d
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
51 additions
and
6 deletions
+51
-6
Schema.pm
Bugzilla/DB/Schema.pm
+1
-1
checksetup.pl
checksetup.pl
+44
-2
create-guided.html.tmpl
template/en/default/bug/create/create-guided.html.tmpl
+2
-1
create.html.tmpl
template/en/default/bug/create/create.html.tmpl
+2
-1
edit.html.tmpl
template/en/default/bug/edit.html.tmpl
+2
-1
No files found.
Bugzilla/DB/Schema.pm
View file @
d7447bf9
...
@@ -167,7 +167,7 @@ use constant ABSTRACT_SCHEMA => {
...
@@ -167,7 +167,7 @@ use constant ABSTRACT_SCHEMA => {
bug_status
=>
{
TYPE
=>
'varchar(64)'
,
NOTNULL
=>
1
},
bug_status
=>
{
TYPE
=>
'varchar(64)'
,
NOTNULL
=>
1
},
creation_ts
=>
{
TYPE
=>
'DATETIME'
},
creation_ts
=>
{
TYPE
=>
'DATETIME'
},
delta_ts
=>
{
TYPE
=>
'DATETIME'
,
NOTNULL
=>
1
},
delta_ts
=>
{
TYPE
=>
'DATETIME'
,
NOTNULL
=>
1
},
short_desc
=>
{
TYPE
=>
'
MEDIUMTEXT
'
,
NOTNULL
=>
1
},
short_desc
=>
{
TYPE
=>
'
varchar(255)
'
,
NOTNULL
=>
1
},
op_sys
=>
{
TYPE
=>
'varchar(64)'
,
NOTNULL
=>
1
},
op_sys
=>
{
TYPE
=>
'varchar(64)'
,
NOTNULL
=>
1
},
priority
=>
{
TYPE
=>
'varchar(64)'
,
NOTNULL
=>
1
},
priority
=>
{
TYPE
=>
'varchar(64)'
,
NOTNULL
=>
1
},
product_id
=>
{
TYPE
=>
'INT2'
,
NOTNULL
=>
1
},
product_id
=>
{
TYPE
=>
'INT2'
,
NOTNULL
=>
1
},
...
...
checksetup.pl
View file @
d7447bf9
...
@@ -3781,8 +3781,10 @@ if ($dbh->bz_column_info('votes', 'count')) {
...
@@ -3781,8 +3781,10 @@ if ($dbh->bz_column_info('votes', 'count')) {
}
}
# 2004/02/15 - Summaries shouldn't be null - see bug 220232
# 2004/02/15 - Summaries shouldn't be null - see bug 220232
$dbh
->
bz_alter_column
(
'bugs'
,
'short_desc'
,
if
(
!
exists
$dbh
->
bz_column_info
(
'bugs'
,
'short_desc'
)
->
{
NOTNULL
})
{
{
TYPE
=>
'MEDIUMTEXT'
,
NOTNULL
=>
1
},
''
);
$dbh
->
bz_alter_column
(
'bugs'
,
'short_desc'
,
{
TYPE
=>
'MEDIUMTEXT'
,
NOTNULL
=>
1
},
''
);
}
# 2003-10-24 - alt@sonic.net, bug 224208
# 2003-10-24 - alt@sonic.net, bug 224208
# Support classification level
# Support classification level
...
@@ -4293,6 +4295,46 @@ if ($dbh->bz_column_info('flags', 'id')->{'TYPE'} eq 'INT3') {
...
@@ -4293,6 +4295,46 @@ if ($dbh->bz_column_info('flags', 'id')->{'TYPE'} eq 'INT3') {
$dbh
->
bz_drop_column
(
'flags'
,
'is_active'
);
$dbh
->
bz_drop_column
(
'flags'
,
'is_active'
);
}
}
# short_desc should not be a mediumtext, fix anything longer than 255 chars.
if
(
$dbh
->
bz_column_info
(
'bugs'
,
'short_desc'
)
->
{
TYPE
}
eq
'MEDIUMTEXT'
)
{
# Move extremely long summarries into a comment ("from" the Reporter),
# and then truncate the summary.
my
$long_summary_bugs
=
$dbh
->
selectall_arrayref
(
'SELECT bug_id, short_desc, reporter
FROM bugs WHERE LENGTH(short_desc) > 255'
);
if
(
@$long_summary_bugs
)
{
print
<<EOF;
WARNING: Some of your bugs had summaries longer than 255 characters.
They have had their original summary copied into a comment, and then
the summary was truncated to 255 characters. The affected bug numbers were:
EOF
my
$comment_sth
=
$dbh
->
prepare
(
'INSERT INTO longdescs (bug_id, who, thetext, bug_when)
VALUES (?, ?, ?, NOW())'
);
my
$desc_sth
=
$dbh
->
prepare
(
'UPDATE bugs SET short_desc = ?
WHERE bug_id = ?'
);
my
@affected_bugs
;
foreach
my
$bug
(
@$long_summary_bugs
)
{
my
(
$bug_id
,
$summary
,
$reporter_id
)
=
@$bug
;
my
$summary_comment
=
"The original summary for this bug"
.
" was longer than 255 characters, and so it was truncated"
.
" when Bugzilla was upgraded. The original summary was:"
.
"\n\n$summary"
;
$comment_sth
->
execute
(
$bug_id
,
$reporter_id
,
$summary_comment
);
my
$short_summary
=
substr
(
$summary
,
0
,
252
)
.
"..."
;
$desc_sth
->
execute
(
$short_summary
,
$bug_id
);
push
(
@affected_bugs
,
$bug_id
);
}
print
join
(
', '
,
@affected_bugs
)
.
"\n\n"
;
}
$dbh
->
bz_alter_column
(
'bugs'
,
'short_desc'
,
{
TYPE
=>
'varchar(255)'
,
NOTNULL
=>
1
});
}
# If you had to change the --TABLE-- definition in any way, then add your
# If you had to change the --TABLE-- definition in any way, then add your
# differential change code *** A B O V E *** this comment.
# differential change code *** A B O V E *** this comment.
#
#
...
...
template/en/default/bug/create/create-guided.html.tmpl
View file @
d7447bf9
...
@@ -310,7 +310,8 @@ function PutDescription() {
...
@@ -310,7 +310,8 @@ function PutDescription() {
<b>Summary</b>
<b>Summary</b>
</td>
</td>
<td valign="top">
<td valign="top">
<input type="text" size="80" name="short_desc" id="short_desc">
<input type="text" size="80" name="short_desc" id="short_desc"
maxlength="255">
<p>
<p>
A sentence which summarises the problem.
A sentence which summarises the problem.
Please be descriptive and use lots of keywords.
Please be descriptive and use lots of keywords.
...
...
template/en/default/bug/create/create.html.tmpl
View file @
d7447bf9
...
@@ -301,7 +301,8 @@ function set_assign_to() {
...
@@ -301,7 +301,8 @@ function set_assign_to() {
<tr>
<tr>
<td align="right"><strong>Summary:</strong></td>
<td align="right"><strong>Summary:</strong></td>
<td colspan="3">
<td colspan="3">
<input name="short_desc" size="60" value="[% short_desc FILTER html %]">
<input name="short_desc" size="60" value="[% short_desc FILTER html %]"
maxlength="255">
</td>
</td>
</tr>
</tr>
...
...
template/en/default/bug/edit.html.tmpl
View file @
d7447bf9
...
@@ -374,7 +374,8 @@
...
@@ -374,7 +374,8 @@
</td>
</td>
<td colspan="5">
<td colspan="5">
<input name="short_desc" id="short_desc"
<input name="short_desc" id="short_desc"
value="[% bug.short_desc FILTER html %]" size="60">
value="[% bug.short_desc FILTER html %]" size="60"
maxlength="255">
</td>
</td>
</tr>
</tr>
...
...
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