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
d5a7a714
Commit
d5a7a714
authored
Nov 03, 2001
by
bbaetz%cs.mcgill.ca
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Bug 107718 - mass changes give all changed bugs the groupset of the first
bug in the list. Do bit fiddling instead of adding groupsets from the first bug. r=justdave, jake
parent
539dccaf
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
37 deletions
+20
-37
process_bug.cgi
process_bug.cgi
+20
-37
No files found.
process_bug.cgi
View file @
d5a7a714
...
@@ -547,45 +547,28 @@ sub CheckonComment( $ ) {
...
@@ -547,45 +547,28 @@ sub CheckonComment( $ ) {
# select lists. This means that instead of looking for the bit-X values in
# select lists. This means that instead of looking for the bit-X values in
# the form, we need to loop through all the bug groups this user has access
# the form, we need to loop through all the bug groups this user has access
# to, and for each one, see if it's selected.
# to, and for each one, see if it's selected.
# In addition, adding a little extra work so that we don't clobber groupsets
# In order to make mass changes work correctly, keep a sum of bits for groups
# for bugs where the user doesn't have access to the group, but does to the
# added, and another one for groups removed, and then let mysql do the bit
# bug (as with the proposed reporter access patch.)
# operations
# If the form element isn't present, or the user isn't in the group, leave
# it as-is
if
(
$::usergroupset
ne
'0'
)
{
if
(
$::usergroupset
ne
'0'
)
{
# We want to start from zero and build up, since if all boxes have been
my
$groupAdd
=
"0"
;
# unchecked, we want to revert to 0.
my
$groupDel
=
"0"
;
DoComma
();
$::query
.=
"groupset = 0"
;
SendSQL
(
"SELECT bit, isactive FROM groups WHERE "
.
my
(
$id
)
=
(
@idlist
);
"isbuggroup != 0 AND bit & $::usergroupset != 0 ORDER BY bit"
);
SendSQL
(
<<
_EOQ_
);
while
(
my
(
$b
,
$isactive
)
=
FetchSQLData
())
{
SELECT
bit
,
bit
&
$::usergroupset
!=
0
,
bit
&
bugs
.
groupset
!=
0
if
(
!
$::FORM
{
"bit-$b"
})
{
FROM
groups
,
bugs
$groupDel
.=
"+$b"
;
WHERE
isbuggroup
!=
0
AND
bug_id
=
$id
}
elsif
(
$::FORM
{
"bit-$b"
}
==
1
&&
$isactive
)
{
ORDER
BY
bit
$groupAdd
.=
"+$b"
;
_EOQ_
}
while
(
my
(
$b
,
$userhasgroup
,
$bughasgroup
)
=
FetchSQLData
())
{
}
if
(
!
$::FORM
{
"bit-$b"
})
{
if
(
$groupAdd
ne
"0"
||
$groupDel
ne
"0"
)
{
# If we make it here, the item didn't exist on the form or the user
DoComma
();
# said to clear it. The only time we add this group back in is if
$::query
.=
"groupset = ((groupset & ~($groupDel)) | ($groupAdd))"
;
# the bug already has this group on it and the user can't access it.
if
(
$bughasgroup
&&
!
$userhasgroup
)
{
$::query
.=
" + $b"
;
}
}
elsif
(
$::FORM
{
"bit-$b"
}
==
-
1
)
{
# If we get here, the user came from the change several bugs form, and
# said not to change this group restriction. So we'll add this group
# back in only if the bug already has it.
if
(
$bughasgroup
)
{
$::query
.=
" + $b"
;
}
}
else
{
# If we get here, the user said to set this group. If they don't have
# access to it, we'll use what's already on the bug, otherwise we'll
# add this one in.
if
(
$userhasgroup
||
$bughasgroup
)
{
$::query
.=
" + $b"
;
}
}
}
}
}
}
foreach
my
$field
(
"rep_platform"
,
"priority"
,
"bug_severity"
,
foreach
my
$field
(
"rep_platform"
,
"priority"
,
"bug_severity"
,
...
...
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