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
43f03aa4
Commit
43f03aa4
authored
Jan 04, 2009
by
dkl%redhat.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Bug 99205: Allow mass-editing of dependencies
Patch by Dave Lawrence <dkl@redhat.com> - r/a=mkanat
parent
dd52ea1b
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
51 additions
and
5 deletions
+51
-5
Bug.pm
Bugzilla/Bug.pm
+3
-1
process_bug.cgi
process_bug.cgi
+18
-4
edit-multiple.html.tmpl
template/en/default/list/edit-multiple.html.tmpl
+30
-0
No files found.
Bugzilla/Bug.pm
View file @
43f03aa4
...
...
@@ -1156,7 +1156,9 @@ sub _check_dependencies {
my
%
deps_in
=
(
dependson
=>
$depends_on
||
''
,
blocked
=>
$blocks
||
''
);
foreach
my
$type
qw(dependson blocked)
{
my
@bug_ids
=
split
(
/[\s,]+/
,
$deps_in
{
$type
});
my
@bug_ids
=
ref
(
$deps_in
{
$type
})
?
@
{
$deps_in
{
$type
}}
:
split
(
/[\s,]+/
,
$deps_in
{
$type
});
# Eliminate nulls.
@bug_ids
=
grep
{
$_
}
@bug_ids
;
# We do this up here to make sure all aliases are converted to IDs.
...
...
process_bug.cgi
View file @
43f03aa4
...
...
@@ -271,10 +271,24 @@ if ($cgi->param('id') && (defined $cgi->param('dependson')
$first_bug
->
set_dependencies
(
scalar
$cgi
->
param
(
'dependson'
),
scalar
$cgi
->
param
(
'blocked'
));
}
# Right now, you can't modify dependencies on a mass change.
else
{
$cgi
->
delete
(
'dependson'
);
$cgi
->
delete
(
'blocked'
);
elsif
(
should_set
(
'dependson'
)
||
should_set
(
'blocked'
))
{
foreach
my
$bug
(
@bug_objects
)
{
my
%
temp_deps
;
foreach
my
$type
(
qw(dependson blocked)
)
{
$temp_deps
{
$type
}
=
{
map
{
$_
=>
1
}
@
{
$bug
->
$type
}
};
if
(
should_set
(
$type
)
&&
$cgi
->
param
(
$type
.
'_action'
)
=~
/^(add|remove)$/
)
{
foreach
my
$id
(
split
(
/[,\s]+/
,
$cgi
->
param
(
$type
)))
{
if
(
$cgi
->
param
(
$type
.
'_action'
)
eq
'remove'
)
{
delete
$temp_deps
{
$type
}{
$id
};
}
else
{
$temp_deps
{
$type
}{
$id
}
=
1
;
}
}
}
}
$bug
->
set_dependencies
([
keys
%
{
$temp_deps
{
'dependson'
}}
],
[
keys
%
{
$temp_deps
{
'blocked'
}}
]);
}
}
my
$any_keyword_changes
;
...
...
template/en/default/list/edit-multiple.html.tmpl
View file @
43f03aa4
...
...
@@ -229,6 +229,36 @@
</tr>
[% END %]
<tr>
<th>
<label for="dependson">
Depends On:
</label>
</th>
<td colspan="3">
<input id="dependson" name="dependson" size="32">
<select name="dependson_action">
<option value="add">Add these IDs</option>
<option value="remove">Delete these IDs</option>
</select>
</td>
</tr>
<tr>
<th>
<label for="blocked">
Blocks:
</label>
</th>
<td colspan="3">
<input id="blocked" name="blocked" size="32">
<select name="blocked_action">
<option value="add">Add these IDs</option>
<option value="remove">Delete these IDs</option>
</select>
</td>
</tr>
[% IF Param('usestatuswhiteboard') %]
<tr>
<td align="right">
...
...
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