]> git.ipfire.org Git - thirdparty/bugzilla.git/commitdiff
Bug 1333525 - Blocking type tracking flags are not visible from the modal UI
authorDavid Lawrence <dkl@mozilla.com>
Thu, 26 Jan 2017 00:25:38 +0000 (00:25 +0000)
committerDavid Lawrence <dkl@mozilla.com>
Thu, 26 Jan 2017 00:25:38 +0000 (00:25 +0000)
extensions/BugModal/template/en/default/bug_modal/edit.html.tmpl

index acdd55ee2c6fe9a8c049be83fbab6dc6d4bb99c9..d81fb9e92631ef974c43875c7de37d4a901e7d85 100644 (file)
     LAST;
   END;
 
-  # count set project/tracking flags
+  # count set project/tracking/blocking flags
   tracking_flags_has = 0;
   tracking_flags_set = 0;
   project_flags_has = 0;
   project_flags_set = 0;
+  blocking_flags_has = 0;
+  blocking_flags_set = 0;
   FOREACH flag IN tracking_flags;
     is_set = flag.bug_flag(bug.id).value != "---";
     IF flag.flag_type == "tracking";
         project_flags_set = 1;
       END;
     END;
+    IF flag.flag_type == 'blocking';
+      blocking_flags_has = 1;
+      IF is_set;
+        blocking_flags_set = 1;
+      END;
+    END;
   END;
 
   # build firefox flags subtitle
     && bug.target_milestone == "---"
     && !has_bug_flags
     && !project_flags_set
-    && !tracking_flags_set;
+    && !tracking_flags_set
+    && !blocking_flags_set;
   sub = [];
   open_deps = bug.depends_on_obj.only("resolution", "").size;
   IF open_deps;
   %]
     [% WRAPPER fields_lhs %]
 
-      [% UNLESS tracking_flags_set || project_flags_set %]
+      [% UNLESS tracking_flags_set || project_flags_set || blocking_flags_set %]
         <p class="edit-hide">
           This [% terms.bug %] is not currently tracked.
         </p>
     [% END %]
     [% WRAPPER fields_rhs %]
 
+      [% IF blocking_flags_has %]
+        [%# blocking flags %]
+        [% WRAPPER bug_modal/field.html.tmpl
+            container = 1
+            label = "Blocking Flags"
+            hide_on_view = !blocking_flags_set
+        %]
+          [% INCLUDE bug_modal/tracking_flags.html.tmpl
+              type = "blocking"
+          %]
+        [% END %]
+      [% END %]
+
       [% IF project_flags_has %]
         [%# project flags %]
         [% WRAPPER bug_modal/field.html.tmpl