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
fa8fd93a
Commit
fa8fd93a
authored
Aug 07, 2011
by
Frédéric Buclin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Bug 55436: Implement list of duplicate bug numbers on show_bug.cgi
r=mkanat a=LpSolit
parent
9f377584
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
50 additions
and
4 deletions
+50
-4
Bug.pm
Bugzilla/Bug.pm
+22
-1
edit.html.tmpl
template/en/default/bug/edit.html.tmpl
+28
-3
No files found.
Bugzilla/Bug.pm
View file @
fa8fd93a
...
...
@@ -487,10 +487,11 @@ sub preload {
my
@all_dep_ids
;
foreach
my
$bug
(
@$bugs
)
{
push
(
@all_dep_ids
,
@
{
$bug
->
blocked
},
@
{
$bug
->
dependson
});
push
(
@all_dep_ids
,
@
{
$bug
->
duplicate_ids
});
}
@all_dep_ids
=
uniq
@all_dep_ids
;
# If we don't do this, can_see_bug will do one call per bug in
# the dependency
lists, during get_bug_link in Bugzilla::Template
.
# the dependency
and duplicate lists, in Bugzilla::Template::get_bug_link
.
$user
->
visible_bugs
(
\
@all_dep_ids
);
}
...
...
@@ -3243,6 +3244,26 @@ sub depends_on_obj {
return
$self
->
{
depends_on_obj
};
}
sub
duplicates
{
my
$self
=
shift
;
return
$self
->
{
duplicates
}
if
exists
$self
->
{
duplicates
};
return
[]
if
$self
->
{
error
};
$self
->
{
duplicates
}
=
Bugzilla::
Bug
->
new_from_list
(
$self
->
duplicate_ids
);
return
$self
->
{
duplicates
};
}
sub
duplicate_ids
{
my
$self
=
shift
;
return
$self
->
{
duplicate_ids
}
if
exists
$self
->
{
duplicate_ids
};
return
[]
if
$self
->
{
error
};
my
$dbh
=
Bugzilla
->
dbh
;
$self
->
{
duplicate_ids
}
=
$dbh
->
selectcol_arrayref
(
'SELECT dupe FROM duplicates WHERE dupe_of = ?'
,
undef
,
$self
->
id
);
return
$self
->
{
duplicate_ids
};
}
sub
flag_types
{
my
(
$self
)
=
@_
;
return
$self
->
{
'flag_types'
}
if
exists
$self
->
{
'flag_types'
};
...
...
template/en/default/bug/edit.html.tmpl
View file @
fa8fd93a
...
...
@@ -164,8 +164,10 @@
[% PROCESS section_url_keyword_whiteboard %]
[% PROCESS section_spacer %]
[%# *** Dependencies *** %]
[%# *** Dependencies and duplicates *** %]
[% PROCESS section_duplicates %]
[% PROCESS section_dependson_blocks %]
</table>
...
...
@@ -625,8 +627,31 @@
[% END %]
[%############################################################################%]
[%# Block for Depends On / Blocks #%]
[%# Block for Duplicates #%]
[%############################################################################%]
[% BLOCK section_duplicates %]
[% RETURN UNLESS bug.duplicates.size %]
<tr>
<td class="field_label">
<label for="duplicates">Duplicates</label>:
</td>
<td class="field_value" colspan="2">
<span id="duplicates">
[% FOREACH dupe = bug.duplicates %]
[% dupe.id FILTER bug_link(dupe, use_alias => 1) FILTER none %][% " " %]
[% END %]
</span>
(<a href="buglist.cgi?bug_id=[% bug.duplicate_ids.join(",") FILTER html %]">
[%-%]view as [% terms.bug %] list</a>)
</td>
</tr>
[% END %]
[%############################################################################%]
[%# Block for Depends On / Blocks #%]
[%############################################################################%]
[% BLOCK section_dependson_blocks %]
<tr>
[% INCLUDE dependencies
...
...
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