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
fc443eda
Commit
fc443eda
authored
Oct 19, 2012
by
Frédéric Buclin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Bug 531243: Bugzilla crashes on show_bug if it's hit while a custom field is being added
r=justdave a=LpSolit
parent
ddc96746
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
1 deletion
+9
-1
Field.pm
Bugzilla/Field.pm
+9
-1
No files found.
Bugzilla/Field.pm
View file @
fc443eda
...
@@ -1035,7 +1035,11 @@ sub create {
...
@@ -1035,7 +1035,11 @@ sub create {
# the parameter isn't sent to create().
# the parameter isn't sent to create().
$params
->
{
sortkey
}
=
undef
if
!
exists
$params
->
{
sortkey
};
$params
->
{
sortkey
}
=
undef
if
!
exists
$params
->
{
sortkey
};
$params
->
{
type
}
||=
0
;
$params
->
{
type
}
||=
0
;
# We mark the custom field as obsolete till it has been fully created,
# to avoid race conditions when viewing bugs at the same time.
my
$is_obsolete
=
$params
->
{
obsolete
};
$params
->
{
obsolete
}
=
1
if
$params
->
{
custom
};
$dbh
->
bz_start_transaction
();
$dbh
->
bz_start_transaction
();
$class
->
check_required_create_fields
(
@_
);
$class
->
check_required_create_fields
(
@_
);
my
$field_values
=
$class
->
run_create_validators
(
$params
);
my
$field_values
=
$class
->
run_create_validators
(
$params
);
...
@@ -1064,6 +1068,10 @@ sub create {
...
@@ -1064,6 +1068,10 @@ sub create {
# Insert a default value of "---" into the legal values table.
# Insert a default value of "---" into the legal values table.
$dbh
->
do
(
"INSERT INTO $name (value) VALUES ('---')"
);
$dbh
->
do
(
"INSERT INTO $name (value) VALUES ('---')"
);
}
}
# Restore the original obsolete state of the custom field.
$dbh
->
do
(
'UPDATE fielddefs SET obsolete = 0 WHERE id = ?'
,
undef
,
$field
->
id
)
unless
$is_obsolete
;
}
}
return
$field
;
return
$field
;
...
...
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