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
6c0edaa7
Commit
6c0edaa7
authored
Sep 08, 2010
by
Frédéric Buclin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Bug 463134: Remove "Show every bug in the system with dependencies" in dependency graphs
r/a=mkanat
parent
eeffc2b5
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
42 additions
and
57 deletions
+42
-57
showdependencygraph.cgi
showdependencygraph.cgi
+41
-53
dependency-graph.html.tmpl
template/en/default/bug/dependency-graph.html.tmpl
+1
-4
No files found.
showdependencygraph.cgi
View file @
6c0edaa7
...
...
@@ -96,6 +96,8 @@ sub AddLink {
}
}
ThrowCodeError
(
"missing_bug_id"
)
if
!
defined
$cgi
->
param
(
'id'
);
# The list of valid directions. Some are not proposed in the dropdrown
# menu despite the fact that they are valid.
my
@valid_rankdirs
=
(
'LR'
,
'RL'
,
'TB'
,
'BT'
);
...
...
@@ -109,10 +111,6 @@ if (!grep { $_ eq $rankdir } @valid_rankdirs) {
my
$display
=
$cgi
->
param
(
'display'
)
||
'tree'
;
my
$webdotdir
=
bz_locations
()
->
{
'webdotdir'
};
if
(
!
defined
$cgi
->
param
(
'id'
)
&&
$display
ne
'doall'
)
{
ThrowCodeError
(
"missing_bug_id"
);
}
my
(
$fh
,
$filename
)
=
File::Temp::
tempfile
(
"XXXXXXXXXX"
,
SUFFIX
=>
'.dot'
,
DIR
=>
$webdotdir
,
...
...
@@ -132,64 +130,54 @@ node [URL="${urlbase}show_bug.cgi?id=\\N", style=filled, color=lightgrey]
my
%
baselist
;
if
(
$display
eq
'doall'
)
{
my
$dependencies
=
$dbh
->
selectall_arrayref
(
"SELECT blocked, dependson FROM dependencies"
);
foreach
my
$i
(
split
(
'[\s,]+'
,
$cgi
->
param
(
'id'
)))
{
my
$bug
=
Bugzilla::
Bug
->
check
(
$i
);
$baselist
{
$bug
->
id
}
=
1
;
}
my
@stack
=
keys
(
%
baselist
);
foreach
my
$dependency
(
@$dependencies
)
{
my
(
$blocked
,
$dependson
)
=
@$dependency
;
AddLink
(
$blocked
,
$dependson
,
$fh
);
}
}
else
{
foreach
my
$i
(
split
(
'[\s,]+'
,
$cgi
->
param
(
'id'
)))
{
my
$bug
=
Bugzilla::
Bug
->
check
(
$i
);
$baselist
{
$bug
->
id
}
=
1
;
}
if
(
$display
eq
'web'
)
{
my
$sth
=
$dbh
->
prepare
(
q{SELECT blocked, dependson
FROM dependencies
WHERE blocked = ? OR dependson = ?}
);
my
@stack
=
keys
(
%
baselist
);
if
(
$display
eq
'web'
)
{
my
$sth
=
$dbh
->
prepare
(
q{SELECT blocked, dependson
FROM dependencies
WHERE blocked = ? OR dependson = ?}
);
foreach
my
$id
(
@stack
)
{
my
$dependencies
=
$dbh
->
selectall_arrayref
(
$sth
,
undef
,
(
$id
,
$id
));
foreach
my
$dependency
(
@$dependencies
)
{
my
(
$blocked
,
$dependson
)
=
@$dependency
;
if
(
$blocked
!=
$id
&&
!
exists
$seen
{
$blocked
})
{
push
@stack
,
$blocked
;
}
if
(
$dependson
!=
$id
&&
!
exists
$seen
{
$dependson
})
{
push
@stack
,
$dependson
;
}
AddLink
(
$blocked
,
$dependson
,
$fh
);
foreach
my
$id
(
@stack
)
{
my
$dependencies
=
$dbh
->
selectall_arrayref
(
$sth
,
undef
,
(
$id
,
$id
));
foreach
my
$dependency
(
@$dependencies
)
{
my
(
$blocked
,
$dependson
)
=
@$dependency
;
if
(
$blocked
!=
$id
&&
!
exists
$seen
{
$blocked
})
{
push
@stack
,
$blocked
;
}
if
(
$dependson
!=
$id
&&
!
exists
$seen
{
$dependson
})
{
push
@stack
,
$dependson
;
}
AddLink
(
$blocked
,
$dependson
,
$fh
);
}
}
# This is the default: a tree instead of a spider web.
else
{
my
@blocker_stack
=
@stack
;
foreach
my
$id
(
@blocker_stack
)
{
my
$blocker_ids
=
Bugzilla::Bug::
EmitDependList
(
'blocked'
,
'dependson'
,
$id
);
foreach
my
$blocker_id
(
@$blocker_ids
)
{
push
(
@blocker_stack
,
$blocker_id
)
unless
$seen
{
$blocker_id
};
AddLink
(
$id
,
$blocker_id
,
$fh
)
;
}
}
# This is the default: a tree instead of a spider web.
else
{
my
@blocker_stack
=
@stack
;
foreach
my
$id
(
@blocker_stack
)
{
my
$blocker_ids
=
Bugzilla::Bug::
EmitDependList
(
'blocked'
,
'dependson'
,
$id
);
foreach
my
$blocker_id
(
@$blocker_ids
)
{
push
(
@blocker_stack
,
$blocker_id
)
unless
$seen
{
$blocker_id
}
;
AddLink
(
$id
,
$blocker_id
,
$fh
);
}
my
@dependent_stack
=
@stack
;
foreach
my
$id
(
@dependent_stack
)
{
my
$dep_bug_ids
=
Bugzilla::Bug::
EmitDependList
(
'dependson'
,
'blocked'
,
$id
);
foreach
my
$dep_bug_id
(
@$dep_bug_ids
)
{
push
(
@dependent_stack
,
$dep_bug_id
)
unless
$seen
{
$dep_bug_id
};
AddLink
(
$dep_bug_id
,
$id
,
$fh
)
;
}
}
my
@dependent_stack
=
@stack
;
foreach
my
$id
(
@dependent_stack
)
{
my
$dep_bug_ids
=
Bugzilla::Bug::
EmitDependList
(
'dependson'
,
'blocked'
,
$id
);
foreach
my
$dep_bug_id
(
@$dep_bug_ids
)
{
push
(
@dependent_stack
,
$dep_bug_id
)
unless
$seen
{
$dep_bug_id
}
;
AddLink
(
$dep_bug_id
,
$id
,
$fh
);
}
}
}
foreach
my
$k
(
keys
(
%
baselist
))
{
$seen
{
$k
}
=
1
;
}
foreach
my
$k
(
keys
(
%
baselist
))
{
$seen
{
$k
}
=
1
;
}
my
$sth
=
$dbh
->
prepare
(
...
...
template/en/default/bug/dependency-graph.html.tmpl
View file @
6c0edaa7
...
...
@@ -21,7 +21,6 @@
[%# INTERFACE:
# bug_id: integer. The number of the bug(s).
# multiple_bugs: boolean. True if bug_id contains > 1 bug number.
# doall: boolean. True if we are displaying every bug in the database.
# showsummary: boolean. True if we are showing bug summaries.
# rankdir: string. "TB" if we are ranking top-to-bottom,
"LR" if left-to-right.
...
...
@@ -37,7 +36,7 @@
header = title
%]
[% IF NOT multiple_bugs
AND NOT doall
%]
[% IF NOT multiple_bugs %]
[% filtered_desc = short_desc FILTER html %]
[% title = "$title for $terms.bug $bug_id"
header = "$header for $terms.bug <a href=\"show_bug.cgi?id=$bug_id\">$bug_id</a>"
...
...
@@ -82,8 +81,6 @@
Restrict to [% terms.bugs %] having a direct relationship with entered [% terms.bugs %]</option>
<option value="web" [% 'selected="selected"' IF display == "web" %]>
Show all [% terms.bugs %] having any relationship with entered [% terms.bugs %]</option>
<option value="doall" [% 'selected="selected"' IF display == "doall" %]>
Show every [% terms.bug %] in the system with dependencies</option>
</select>
</td>
</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