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
0ce44681
Commit
0ce44681
authored
Mar 15, 2005
by
mkanat%kerio.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Bug 285534: bugs.qa_contact should allow NULL
Patch By Max Kanat-Alexander <mkanat@kerio.com> r=joel, a=justdave
parent
0ab2e4bf
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
32 additions
and
11 deletions
+32
-11
Bug.pm
Bugzilla/Bug.pm
+1
-1
Schema.pm
Bugzilla/DB/Schema.pm
+1
-1
User.pm
Bugzilla/User.pm
+2
-1
checksetup.pl
checksetup.pl
+9
-2
globals.pl
globals.pl
+1
-0
post_bug.cgi
post_bug.cgi
+1
-1
process_bug.cgi
process_bug.cgi
+15
-3
sanitycheck.cgi
sanitycheck.cgi
+2
-2
No files found.
Bugzilla/Bug.pm
View file @
0ce44681
...
...
@@ -372,7 +372,7 @@ sub qa_contact () {
my
(
$self
)
=
@_
;
return
$self
->
{
'qa_contact'
}
if
exists
$self
->
{
'qa_contact'
};
if
(
Param
(
'useqacontact'
)
&&
$self
->
{
'qa_contact_id'
}
>
0
)
{
if
(
Param
(
'useqacontact'
)
&&
$self
->
{
'qa_contact_id'
})
{
$self
->
{
'qa_contact'
}
=
new
Bugzilla::
User
(
$self
->
{
'qa_contact_id'
});
}
else
{
# XXX - This is somewhat inconsistent with the assignee/reporter
...
...
Bugzilla/DB/Schema.pm
View file @
0ce44681
...
...
@@ -145,7 +145,7 @@ use constant ABSTRACT_SCHEMA => {
resolution
=>
{
TYPE
=>
'varchar(64)'
,
NOTNULL
=>
1
},
target_milestone
=>
{
TYPE
=>
'varchar(20)'
,
NOTNULL
=>
1
,
DEFAULT
=>
"'---'"
},
qa_contact
=>
{
TYPE
=>
'INT3'
,
NOTNULL
=>
1
},
qa_contact
=>
{
TYPE
=>
'INT3'
},
status_whiteboard
=>
{
TYPE
=>
'MEDIUMTEXT'
,
NOTNULL
=>
1
,
DEFAULT
=>
"''"
},
votes
=>
{
TYPE
=>
'INT3'
,
NOTNULL
=>
1
,
...
...
Bugzilla/User.pm
View file @
0ce44681
...
...
@@ -359,7 +359,8 @@ sub can_see_bug {
$sth
->
finish
;
$self
->
{
sthCanSeeBug
}
=
$sth
;
return
(
((
$reporter
==
$userid
)
&&
$reporter_access
)
||
(
Param
(
'useqacontact'
)
&&
(
$qacontact
==
$userid
)
&&
$userid
)
||
(
Param
(
'useqacontact'
)
&&
$qacontact
&&
(
$qacontact
==
$userid
))
||
(
$owner
==
$userid
)
||
(
$isoncclist
&&
$cclist_access
)
||
(
!
$missinggroup
)
);
...
...
checksetup.pl
View file @
0ce44681
...
...
@@ -1854,12 +1854,12 @@ unless ($sth->rows) {
# note: since admin user is not yet known, components gets a 0 for
# initialowner and this is fixed during final checks.
$dbh
->
do
(
"INSERT INTO components (name, product_id, description, "
.
"initialowner
, initialqacontact
) "
.
"initialowner) "
.
"VALUES ("
.
"'TestComponent', $product_id, "
.
"'This is a test component in the test product database. "
.
"This ought to be blown away and replaced with real stuff in "
.
"a finished installation of Bugzilla.', 0
, 0
)"
);
"a finished installation of Bugzilla.', 0)"
);
$dbh
->
do
(
q{INSERT INTO milestones (product_id, value, sortkey)
VALUES (?,?,?)}
,
undef
,
$product_id
,
'---'
,
0
);
...
...
@@ -3856,6 +3856,13 @@ if(!$dbh->bz_get_field_def('bugs', 'lastdiffed')->[2]) {
# 2005-03-03 travis@sedsystems.ca -- Bug 41972
add_setting
(
"display_quips"
,
{
"on"
=>
1
,
"off"
=>
2
},
"on"
);
# 2005-03-09 qa_contact should be NULL instead of 0, bug 285534
if
(
!
$dbh
->
bz_get_field_def
(
'bugs'
,
'qa_contact'
)
->
[
2
])
{
# if it's NOT NULL
$dbh
->
bz_change_field_type
(
'bugs'
,
'qa_contact'
,
'mediumint'
);
$dbh
->
do
(
"UPDATE bugs SET qa_contact = NULL WHERE qa_contact = 0"
);
$dbh
->
do
(
"UPDATE components SET initialqacontact = NULL
WHERE initialqacontact = 0"
);
}
}
# END LEGACY CHECKS
...
...
globals.pl
View file @
0ce44681
...
...
@@ -595,6 +595,7 @@ sub ValidatePassword {
sub
DBID_to_name
{
my
(
$id
)
=
(
@_
);
return
"__UNKNOWN__"
if
!
defined
$id
;
# $id should always be a positive integer
if
(
$id
=~
m/^([1-9][0-9]*)$/
)
{
$id
=
$1
;
...
...
post_bug.cgi
View file @
0ce44681
...
...
@@ -154,7 +154,7 @@ if (Param("useqacontact")) {
$qa_contact
=
DBNameToIdAndCheck
(
trim
(
$::FORM
{
'qa_contact'
}));
}
if
(
defined
$qa_contact
&&
$qa_contact
!=
0
)
{
if
(
$qa_contact
)
{
$::FORM
{
'qa_contact'
}
=
$qa_contact
;
push
(
@bug_fields
,
"qa_contact"
);
}
...
...
process_bug.cgi
View file @
0ce44681
...
...
@@ -349,6 +349,9 @@ sub CheckCanChangeField {
# START DO_NOT_CHANGE
my
(
$field
,
$bugid
,
$oldvalue
,
$newvalue
)
=
(
@_
);
$oldvalue
=
defined
(
$oldvalue
)
?
$oldvalue
:
''
;
$newvalue
=
defined
(
$newvalue
)
?
$newvalue
:
''
;
# Return true if they haven't changed this field at all.
if
(
$oldvalue
eq
$newvalue
)
{
return
1
;
...
...
@@ -436,7 +439,7 @@ sub CheckCanChangeField {
}
# Allow the QA contact to change anything else.
if
(
Param
(
'useqacontact'
)
&&
(
$qacontactid
==
$whoid
))
{
if
(
Param
(
'useqacontact'
)
&&
$qacontactid
&&
(
$qacontactid
==
$whoid
))
{
return
1
;
}
...
...
@@ -877,14 +880,18 @@ my $qacontact;
if
(
defined
$::FORM
{
'qa_contact'
}
&&
$::FORM
{
'knob'
}
ne
"reassignbycomponent"
)
{
$qacontact
=
0
;
my
$name
=
trim
(
$::FORM
{
'qa_contact'
});
# The QA contact cannot be deleted from show_bug.cgi for a single bug!
if
(
$name
ne
$::FORM
{
'dontchange'
})
{
$qacontact
=
DBNameToIdAndCheck
(
$name
)
if
(
$name
ne
""
);
DoComma
();
if
(
$qacontact
)
{
$::query
.=
"qa_contact = $qacontact"
;
}
else
{
$::query
.=
"qa_contact = NULL"
;
}
}
}
CheckFormFieldDefined
(
\%::
FORM
,
'knob'
);
...
...
@@ -967,10 +974,15 @@ SWITCH: for ($::FORM{'knob'}) {
if
(
Param
(
"useqacontact"
))
{
SendSQL
(
"SELECT initialqacontact FROM components "
.
"WHERE components.id = $comp_id"
);
$qacontact
=
FetchOneColumn
()
||
0
;
$qacontact
=
FetchOneColumn
();
DoComma
();
if
(
$qacontact
)
{
$::query
.=
"qa_contact = $qacontact"
;
}
else
{
$::query
.=
"qa_contact = NULL"
;
}
}
last
SWITCH
;
};
/^reopen$/
&&
CheckonComment
(
"reopen"
)
&&
do
{
...
...
sanitycheck.cgi
View file @
0ce44681
...
...
@@ -304,7 +304,7 @@ CrossCheck("profiles", "userid",
[
'profiles_activity'
,
'who'
],
[
"bugs"
,
"reporter"
,
"bug_id"
],
[
"bugs"
,
"assigned_to"
,
"bug_id"
],
[
"bugs"
,
"qa_contact"
,
"bug_id"
,
[
"0"
]
],
[
"bugs"
,
"qa_contact"
,
"bug_id"
],
[
"attachments"
,
"submitter_id"
,
"bug_id"
],
[
'flags'
,
'setter_id'
,
'bug_id'
],
[
'flags'
,
'requestee_id'
,
'bug_id'
],
...
...
@@ -322,7 +322,7 @@ CrossCheck("profiles", "userid",
[
"tokens"
,
"userid"
],
[
"user_group_map"
,
"user_id"
],
[
"components"
,
"initialowner"
,
"name"
],
[
"components"
,
"initialqacontact"
,
"name"
,
[
"0"
]
]);
[
"components"
,
"initialqacontact"
,
"name"
]);
CrossCheck
(
"products"
,
"id"
,
[
"bugs"
,
"product_id"
,
"bug_id"
],
...
...
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