]> git.ipfire.org Git - thirdparty/bugzilla.git/commitdiff
Bug 1392769 - Add other fields to new-bug
authorSebastin Santy <sebastinssanty@gmail.com>
Tue, 29 Aug 2017 21:02:50 +0000 (02:32 +0530)
committerDylan William Hardison <dylan@hardison.net>
Tue, 29 Aug 2017 21:02:50 +0000 (17:02 -0400)
new_bug.cgi
template/en/default/bug/new_bug.html.tmpl

index 6a49e0b68e3a3d7e8261dc8366099243004b6859..4429717c18d1d5c9ec4dc754b276f33a6afb6a25 100644 (file)
@@ -58,6 +58,8 @@ if (lc($cgi->request_method) eq 'post') {
      check_hash_token($token, ['new_bug']);
      my @keywords = $cgi->param('keywords');
      my @groups = $cgi->param('groups');
+     my @cc = split /, /, $cgi->param('cc');
+     my @bug_mentor = split /, /, $cgi->param('bug_mentor');
      my $new_bug = Bugzilla::Bug->create({
                 short_desc   => scalar($cgi->param('short_desc')),
                 product      => scalar($cgi->param('product')),
@@ -68,8 +70,12 @@ if (lc($cgi->request_method) eq 'post') {
                 rep_platform => 'Unspecified',
                 version      => scalar( $cgi->param('version')),
                 keywords     => \@keywords,
-                cc           => [],
+                cc           => \@cc,
                 comment      => scalar($cgi->param('comment')),
+                dependson    => scalar($cgi->param('dependson')),
+                blocked      => scalar($cgi->param('blocked')),
+                assigned_to  => scalar($cgi->param('assigned_to')),
+                bug_mentors  => \@bug_mentor,
             });
      delete_token($token);
 
index 7acb85e21cfddef76fb60322a90148799c8790dc..fc75d4a3dabea8c4313f1d373aa1d06539662bd3 100644 (file)
             [% bug.status_whiteboard == "" ? "---" : bug.status_whiteboard FILTER html %]
           [% END %]
         [% END %]
-      </div>
-      <div class="new-bug-pad">
+
+          [% WRAPPER bug_modal/module.html.tmpl
+            title = "People"
+            collapsed = 1
+          %]
+            [%# people %]
+            [% INCLUDE bug_modal/field.html.tmpl
+                field = bug_fields.assigned_to
+                field_type = constants.FIELD_TYPE_USER
+                edit_only = 1
+                editable = 1
+                help = "https://wiki.mozilla.org/BMO/UserGuide/BugFields#assigned_to"
+            %]
+            [% INCLUDE bug_modal/field.html.tmpl
+                field = bug_fields.bug_mentor
+                field_type = constants.FIELD_TYPE_USERS
+                name = "bug_mentors"
+                label = "Mentors"
+                edit_only = 1
+                editable = 1
+                help = "https://wiki.mozilla.org/BMO/UserGuide/BugFields#bug_mentor"
+            %]
+            [% INCLUDE bug_modal/field.html.tmpl
+                field = bug_fields.cc
+                field_type = constants.FIELD_TYPE_USERS
+                name = "cc"
+                label = "CC"
+                edit_only = 1
+                editable = 1
+                help = "https://wiki.mozilla.org/BMO/UserGuide/BugFields#cc"
+            %]
+          [% END %]
+
+          [% WRAPPER bug_modal/module.html.tmpl
+            title = "Dependency Tree"
+            collapsed = 1
+          %]
+          [%# depends on %]
+          [% INCLUDE bug_modal/field.html.tmpl
+              field = bug_fields.dependson
+              field_type = constants.FIELD_TYPE_FREETEXT
+              edit_only = 1
+              editable = 1
+              help = "https://wiki.mozilla.org/BMO/UserGuide/BugFields#dependson"
+          %]
+
+          [%# blocks %]
+          [% INCLUDE bug_modal/field.html.tmpl
+              field = bug_fields.blocked
+              field_type = constants.FIELD_TYPE_FREETEXT
+              edit_only = 1
+              editable = 1
+              help = "https://wiki.mozilla.org/BMO/UserGuide/BugFields#blocks"
+          %]
+          [% END %]
+        </div>
+        <div class="new-bug-pad">
+        </div>
       </div>
     </div>
   </div>