summaryrefslogtreecommitdiffstats
path: root/template/en/default/bug
diff options
context:
space:
mode:
authorMax Kanat-Alexander <mkanat@bugzilla.org>2010-06-22 04:10:21 +0200
committerMax Kanat-Alexander <mkanat@bugzilla.org>2010-06-22 04:10:21 +0200
commit4acb2424e62cbd64bc92a5dec2cbe1e2b7096157 (patch)
tree9076b3809846e8fc58ce720e0cd32dc0d3c8ff77 /template/en/default/bug
parent601bda78fa436e7030ebcefc589d930c99f1373e (diff)
downloadbugzilla-4acb2424e62cbd64bc92a5dec2cbe1e2b7096157.tar.gz
bugzilla-4acb2424e62cbd64bc92a5dec2cbe1e2b7096157.tar.xz
Bug 22353: Automatic duplicate bug detection on enter_bug.cgi
r=glob, a=mkanat
Diffstat (limited to 'template/en/default/bug')
-rw-r--r--template/en/default/bug/create/create.html.tmpl46
1 files changed, 41 insertions, 5 deletions
diff --git a/template/en/default/bug/create/create.html.tmpl b/template/en/default/bug/create/create.html.tmpl
index a59fe9112..0733de02a 100644
--- a/template/en/default/bug/create/create.html.tmpl
+++ b/template/en/default/bug/create/create.html.tmpl
@@ -30,10 +30,11 @@
[% PROCESS global/header.html.tmpl
title = title
- yui = [ 'autocomplete', 'calendar' ]
- style_urls = [ 'skins/standard/attachment.css' ]
+ yui = [ 'autocomplete', 'calendar', 'datatable' ]
+ style_urls = [ 'skins/standard/attachment.css',
+ 'skins/standard/enter_bug.css' ]
javascript_urls = [ "js/attachment.js", "js/util.js",
- "js/field.js", "js/TUI.js" ]
+ "js/field.js", "js/TUI.js", "js/bug.js" ]
onload = 'set_assign_to();'
%]
@@ -169,7 +170,7 @@ TUI_hide_default('expert_fields');
</script>
<form name="Create" id="Create" method="post" action="post_bug.cgi"
- enctype="multipart/form-data">
+ class="enter_bug_form" enctype="multipart/form-data">
<input type="hidden" name="product" value="[% product.name FILTER html %]">
<input type="hidden" name="token" value="[% token FILTER html %]">
@@ -508,13 +509,48 @@ TUI_hide_default('expert_fields');
<td colspan="3">
<input name="short_desc" size="70" value="[% short_desc FILTER html %]"
maxlength="255" spellcheck="true" aria-required="true"
- class="required">
+ class="required" id="short_desc">
</td>
</tr>
+ [% IF feature_enabled('jsonrpc') AND !cloned_bug_id %]
+ <tr id="possible_duplicates_container" class="bz_default_hidden">
+ <th>Possible<br>Duplicates:</th>
+ <td colspan="3">
+ <div id="possible_duplicates"></div>
+ <script type="text/javascript">
+ var dt_columns = [
+ { key: "id", label: "[% field_descs.bug_id FILTER js %]",
+ formatter: YAHOO.bugzilla.dupTable.formatBugLink },
+ { key: "summary",
+ label: "[% field_descs.short_desc FILTER js %]" },
+ { key: "status",
+ label: "[% field_descs.bug_status FILTER js %]",
+ formatter: YAHOO.bugzilla.dupTable.formatStatus },
+ { key: "update_token", label: '',
+ formatter: YAHOO.bugzilla.dupTable.formatCcButton }
+ ];
+ YAHOO.bugzilla.dupTable.addCcMessage = "Add Me to the CC List";
+ YAHOO.bugzilla.dupTable.init({
+ container: 'possible_duplicates',
+ columns: dt_columns,
+ product_name: '[% product.name FILTER js %]',
+ summary_field: 'short_desc',
+ options: {
+ MSG_LOADING: 'Searching for possible duplicates...',
+ MSG_EMPTY: 'No possible duplicates found.',
+ SUMMARY: 'Possible Duplicates'
+ },
+ });
+ </script>
+ </td>
+ </tr>
+ [% END %]
+
<tr>
<th>Description:</th>
<td colspan="3">
+
[% defaultcontent = BLOCK %]
[% IF cloned_bug_id %]
+++ This [% terms.bug %] was initially created as a clone of [% terms.Bug %] #[% cloned_bug_id %] +++