[%# This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/. # # This Source Code Form is "Incompatible With Secondary Licenses", as # defined by the Mozilla Public License, v. 2.0. #%] [% USE Bugzilla; bug_modal = 1; # only edit one bug UNLESS bug.defined; bug = bugs.0; END; bugid = bug.id; # these are used in a few places is_cced = bug.cc.contains(user.login); unassigned = (bug.assigned_to.login == Bugzilla.localconfig.nobody_user) || (bug.assigned_to.login.search('@(?!invalid).+\.bugs$')); # custom fields that have custom rendering, or should not be rendered rendered_custom_fields = [ 'cf_user_story', 'cf_last_resolved', ]; # all custom fields custom_fields = Bugzilla.active_custom_fields(product => bug.product_obj, component => bug.component_obj, bug_id => bug.id); # extract needinfo flags needinfo = []; FOREACH flag_type IN bug.flag_types; IF flag_type.name == 'needinfo'; needinfo_flag_type = flag_type; FOREACH flag IN flag_type.flags; IF flag.status == '?'; needinfo.push(flag); END; END; END; END; # count attachments active_attachments = 0; obsolete_attachments = 0; FOREACH attachment IN bug.attachments; NEXT IF attachment.isprivate && !(user.is_insider || attachment.attacher.id == user.id || (attachment.is_bounty_attachment && bug.reporter.id == user.id)) ; IF attachment.isobsolete; obsolete_attachments = obsolete_attachments + 1; ELSE; active_attachments = active_attachments + 1; END; END; # count set bug flags (excluding needinfo) has_bug_flags = 0; FOREACH flag IN bug.flags; NEXT IF flag.name == 'needinfo'; has_bug_flags = 1; LAST; END; # 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"; tracking_flags_has = 1; IF is_set; tracking_flags_set = 1; END; END; IF flag.flag_type == "project"; project_flags_has = 1; IF is_set; 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 firefox_flags = []; firefox_fixed_versions = []; # project flags FOREACH row IN tracking_flags_table; NEXT UNLESS row.type == "project"; status_value = row.status.bug_flag(bug.id).value; NEXT IF status_value == "---"; firefox_flags.push(row.name _ ":" _ status_value); END; # tracking flags title and subtitle FOREACH row IN tracking_flags_table; NEXT UNLESS row.type == "tracking"; tracking_value = row.tracking ? row.tracking.bug_flag(bug.id).value : "---"; status_value = row.status.bug_flag(bug.id).value || "---"; NEXT IF tracking_value == "---" && status_value == "---"; blurb = row.name; IF tracking_value != "---"; blurb = blurb _ tracking_value; END; IF status_value != "---"; blurb = blurb _ " " _ status_value; IF status_value == "fixed" || status_value == "verified"; flag_name = row.name; IF flag_name.substr(0, 7) == "firefox"; IF firefox_fixed_versions.0 == ""; firefox_fixed_versions.0 = "Firefox " _ flag_name.substr(7); END; END; END; END; firefox_flags.push(blurb); END; firefox_fixed_version = firefox_fixed_versions.join(", "); IF firefox_flags.size; firefox_flags_subtitle = firefox_flags.join(", "); ELSE; firefox_flags_subtitle = "Not tracked"; END; %] [% IF user.id %]
[% END %] [%# === header === %] [% WRAPPER bug_modal/module.html.tmpl title = "" %]
[%# status summary %] [% WRAPPER bug_modal/field.html.tmpl container = 1 name = "status_summary" no_label = 1 %] [%~ bug.isopened ? 'Open' : 'Closed' ~%] [%~ terms.Bug _ " " _ bug.id FILTER none ~%] [% IF bug.alias %] ([% bug.alias FILTER html %]) [% END %] Opened [% INCLUDE bug_modal/rel_time.html.tmpl ts=bug.creation_ts %] [% IF !bug.isopened %] Closed [% INCLUDE bug_modal/rel_time.html.tmpl ts=bug.cf_last_resolved %] [% ELSIF bug.creation_ts != bug.delta_ts %] Updated [% INCLUDE bug_modal/rel_time.html.tmpl ts=bug.delta_ts %] [% END %] [% END %] [% WRAPPER bug_modal/field.html.tmpl container = 1 no_label = 1 hide_on_edit = 1 %] [%# non-public bug text for screen readers %] [% IF bug.groups_in.size %] [% non_public_desc = "Confidential"; FOREACH group IN bug.groups_in; IF group.secure_mail; non_public_desc = "Security"; BREAK; END; END; %]

[% non_public_desc FILTER none %] [%+ terms.bug %]

[% END %]

[% bug.short_desc FILTER quoteUrls(bug) FILTER wbr %]

[% END %] [%# summary %] [% INCLUDE bug_modal/field.html.tmpl field = bug_fields.short_desc field_type = constants.FIELD_TYPE_FREETEXT hide_on_view = 1 help = "https://wiki.mozilla.org/BMO/UserGuide/BugFields#short_desc" required = 1 %]
[% END %] [%# === categories === %] [% sub = []; sub.push(bug.product _ " :: " _ bug.component); sub.push(bug.bug_type); sub.push(bug.priority) IF bug.priority != "--"; %] [% WRAPPER bug_modal/module.html.tmpl title = "Categories" subtitle = sub %] [% WRAPPER fields_lhs %] [%# product %] [% can_edit_product = bug.check_can_change_field("product", 0, 1) %] [% filtered_product = bug.product_obj.name FILTER uri %] [% filtered_component = bug.component_obj.name FILTER uri %] [% WRAPPER bug_modal/field.html.tmpl field = bug_fields.product field_type = constants.FIELD_TYPE_SINGLE_SELECT hide_on_edit = can_edit_product help = basepath _ "describecomponents.cgi?product=$filtered_product" %] [% END %] [% WRAPPER bug_modal/field.html.tmpl field = bug_fields.product field_type = constants.FIELD_TYPE_SINGLE_SELECT hide_on_view = 1 hide_on_edit = !can_edit_product append_content = 1 help = basepath _ "describecomponents.cgi?product=$filtered_product" %] [% INCLUDE prodcompsearch/form.html.tmpl id = "pcs" custom_select = 1 hidden = 1 throbber = "product-throbber" %] [% END %] [%# component %] [% WRAPPER bug_modal/field.html.tmpl field = bug_fields.component field_type = constants.FIELD_TYPE_SINGLE_SELECT help = basepath _ "describecomponents.cgi?product=$filtered_product&component=$filtered_component#$filtered_component" %] [% END %] [%# version %] [% INCLUDE bug_modal/field.html.tmpl field = bug_fields.version field_type = constants.FIELD_TYPE_SINGLE_SELECT hide_on_view = bug.version == "---" || bug.version.lower == "unspecified" || bug.version.lower == "trunk" || bug.version.lower == "other" help = "https://wiki.mozilla.org/BMO/UserGuide/BugFields#version" %] [%# platform %] [% WRAPPER bug_modal/field.html.tmpl container = 1 label = "Platform" hide_on_view = (bug.rep_platform == 'All' && bug.op_sys == 'All') || (bug.rep_platform == 'Unspecified' && bug.op_sys == 'Unspecified') help = "https://wiki.mozilla.org/BMO/UserGuide/BugFields#rep_platform" %] [% INCLUDE bug_modal/field.html.tmpl field = bug_fields.rep_platform field_type = constants.FIELD_TYPE_SINGLE_SELECT aria_label = bug_fields.rep_platform.description inline = 1 no_indent = 1 %] [% INCLUDE bug_modal/field.html.tmpl field = bug_fields.op_sys field_type = constants.FIELD_TYPE_SINGLE_SELECT aria_label = bug_fields.op_sys.description inline = 1 %] [% WRAPPER bug_modal/field.html.tmpl container = 1 inline = 1 %] [% Hook.process("after_op_sys", 'bug/edit.html.tmpl') %] [% END %] [% END %] [% END %] [% WRAPPER fields_rhs %] [%# type %] [% WRAPPER bug_modal/field.html.tmpl field = bug_fields.bug_type field_type = constants.FIELD_TYPE_SINGLE_SELECT use_buttons = 1 required = Param('require_bug_type') help = "https://wiki.mozilla.org/BMO/UserGuide/BugFields#bug_type" %] [%~ bug.bug_type FILTER html ~%] [% END %] [%# importance %] [% WRAPPER bug_modal/field.html.tmpl name = "importance" label = "Priority" container = 1 help = "https://wiki.mozilla.org/BMO/UserGuide/BugFields#priority" %] [% WRAPPER bug_modal/field.html.tmpl field = bug_fields.priority field_type = constants.FIELD_TYPE_SINGLE_SELECT aria_label = bug_fields.priority.description no_indent = 1 inline = 1 %] [% IF bug.priority == "--" %] Not set [% ELSE %] [% bug.priority FILTER html %] [% END %] [% END %] [% INCLUDE bug_modal/field.html.tmpl field = bug_fields.bug_severity field_type = constants.FIELD_TYPE_SINGLE_SELECT aria_label = bug_fields.bug_severity.description inline = 1 label = "Severity" help = "https://wiki.mozilla.org/BMO/UserGuide/BugFields#bug_severity" %] [% UNLESS cf_hidden_in_product('cf_rank', bug.product, bug.component, bug) %] [% rendered_custom_fields.push('cf_rank') %] [% INCLUDE bug_modal/field.html.tmpl field = bug_fields.cf_rank field_type = constants.FIELD_TYPE_INTEGER inline = 1 label = "Rank" hide_on_view = bug.cf_rank == "" hide_on_edit = !user.in_group('rank-setters') help = "https://wiki.mozilla.org/BMO/UserGuide/BugFields#rank" %] [% END %] [% END %] [%# points %] [% UNLESS cf_hidden_in_product('cf_fx_points', bug.product, bug.component, bug) %] [% rendered_custom_fields.push('cf_fx_points') %] [% INCLUDE bug_modal/field.html.tmpl field = bug_fields.cf_fx_points field_type = bug_fields.cf_fx_points.type hide_on_view = bug.cf_fx_points == "---" %] [% END %] [% END %] [% END %] [%# === tracking === %] [% IF readable_bug_status_json %] [% readable_bug_status_span = BLOCK -%] [%- %] [% END %] [% sub = [{ unfiltered = readable_bug_status_span }] %] [% ELSE %] [% sub = [firefox_flags_subtitle] %] [% END %] [% WRAPPER bug_modal/module.html.tmpl title = "Tracking" subtitle = sub %] [% WRAPPER fields_lhs %] [%# status, resolution %] [% IF bug.assigned_to.id != user.id %] [% WRAPPER bug_modal/field.html.tmpl name = "status-view" container = 1 label = "Status" hide_on_edit = 1 help = "https://wiki.mozilla.org/BMO/UserGuide/BugStatuses" %] [% bug.bug_status FILTER html %] [%+ bug.resolution FILTER html IF bug.resolution %] [% IF bug.dup_id %] of [% terms.bug _ " $bug.dup_id" FILTER bug_link(bug.dup_id) FILTER none %] [% END %] [% END %] [% END %] [%# status/resolution knob %] [% WRAPPER bug_modal/field.html.tmpl name = "status-edit" container = 1 label = "Status" hide_on_view = bug.assigned_to.id != user.id help = "https://wiki.mozilla.org/BMO/UserGuide/BugStatuses" %] [% INCLUDE status_block %] [% END %] [%# milestone %] [% INCLUDE bug_modal/field.html.tmpl field = bug_fields.target_milestone field_type = constants.FIELD_TYPE_SINGLE_SELECT label = "Milestone" hide_on_view = bug.target_milestone == "---" help = "https://wiki.mozilla.org/BMO/UserGuide/BugFields#target_milestone" %] [%# iteration %] [% UNLESS cf_hidden_in_product('cf_fx_iteration', bug.product, bug.component, bug) %] [% rendered_custom_fields.push('cf_fx_iteration') %] [% INCLUDE bug_modal/field.html.tmpl field = bug_fields.cf_fx_iteration field_type = bug_fields.cf_fx_iteration.type hide_on_view = bug.cf_fx_iteration == "---" %] [% END %] [% UNLESS cf_hidden_in_product('cf_due_date', bug.product, bug.component, bug) %] [% rendered_custom_fields.push('cf_due_date') %] [% INCLUDE bug_modal/field.html.tmpl field = bug_fields.cf_due_date field_type = bug_fields.cf_due_date.type hide_on_view = bug.cf_due_date == "" %] [% END %] [% IF project_flags_has %] [%# project flags %] [% WRAPPER bug_modal/field.html.tmpl container = 1 label = "Project Flags" hide_on_view = !project_flags_set help = "https://wiki.mozilla.org/BMO/UserGuide#Tracking_Flags" %] [% INCLUDE bug_modal/tracking_flags.html.tmpl type = "project" %] [% END %] [% END %] [% END %] [% WRAPPER fields_rhs %] [% IF tracking_flags_has %] [%# tracking flags %] [% WRAPPER bug_modal/field.html.tmpl container = 1 label = "Tracking Flags" hide_on_view = !tracking_flags_set help = "https://wiki.mozilla.org/BMO/UserGuide#Tracking_Flags" %] [% INCLUDE bug_modal/tracking_flags.html.tmpl type = "tracking" %] [% END %] [% END %] [% 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 %] [% END %] [% END %] [% BLOCK status_block %] [% INCLUDE bug_modal/field.html.tmpl prefix = prefix field = bug_fields.bug_status field_type = constants.FIELD_TYPE_SINGLE_SELECT aria_label = bug_fields.bug_status.description editable = bug.choices.bug_status.size > 1 values = bug.choices.bug_status inline = 1 no_indent = 1 edit_only = 1 %] [% INCLUDE bug_modal/field.html.tmpl prefix = prefix field = bug_fields.resolution field_type = constants.FIELD_TYPE_SINGLE_SELECT aria_label = bug_fields.resolution.description editable = bug.choices.resolution.size > (bug.resolution == "" ? 0 : 1) values = bug.choices.resolution inline = 1 edit_only = 1 %] [% IF bug.choices.resolution.only("name", "DUPLICATE").size %]
of
[% END %]
[% IF bug.choices.resolution.only("name", "DUPLICATE").size %]
[% END %] [% UNLESS prefix %] [% END %]
[% END %] [%# === people === %] [% sub = []; sub.push("Reporter: " _ bug.reporter.nick); sub.push(unassigned ? "Unassigned" : "Assigned: " _ bug.assigned_to.nick); IF bug.mentors.size; sub.push("Mentored"); END; IF needinfo.size; sub.push("NeedInfo"); END; %] [% WRAPPER bug_modal/module.html.tmpl title = "People" subtitle = sub collapsed = 1 %] [% WRAPPER fields_lhs %] [%# assignee %] [% WRAPPER bug_modal/field.html.tmpl field = bug_fields.assigned_to field_type = constants.FIELD_TYPE_USER hide_on_edit = 1 help = "https://wiki.mozilla.org/BMO/UserGuide/BugFields#assigned_to" %] [% IF unassigned %] Unassigned [% IF bug.check_can_change_field("assigned_to", 0, 1) %] [% END %] [% ELSE %] [% INCLUDE bug_modal/user.html.tmpl u=bug.assigned_to nick_only=1 gravatar_size=20 %] [% END %] [% END %] [% WRAPPER bug_modal/field.html.tmpl field = bug_fields.assigned_to field_type = constants.FIELD_TYPE_USER hide_on_view = 1 action = { class = "take-btn" caption = "Take" hidden = bug.assigned_to.id == user.id || !user.in_group("editbugs") } append_content = 1 default = bug.component_obj.default_assignee.login help = "https://wiki.mozilla.org/BMO/UserGuide/BugFields#assigned_to" %] [% END %] [%# mentors %] [% WRAPPER bug_modal/field.html.tmpl field = bug_fields.bug_mentor field_type = constants.FIELD_TYPE_USERS name = "bug_mentors" label = "Mentors" value = bug.mentors.pluck("login") hide_on_view = bug.mentors.size == 0 help = "https://wiki.mozilla.org/BMO/UserGuide/BugFields#bug_mentor" %] [% IF bug.mentors.size; FOREACH mentor IN bug.mentors; INCLUDE bug_modal/user.html.tmpl u=mentor nick_only=1 gravatar_size=20; END; ELSE; "---"; END; %] [% END %] [%# qa contact %] [% WRAPPER bug_modal/field.html.tmpl field = bug_fields.qa_contact field_type = constants.FIELD_TYPE_USER hide_on_view = bug.qa_contact == "" hide_on_edit = 1 help = "https://wiki.mozilla.org/BMO/UserGuide/BugFields#qa_contact" %] [% INCLUDE bug_modal/user.html.tmpl u=bug.qa_contact nick_only=1 gravatar_size=20 %] [% END %] [% WRAPPER bug_modal/field.html.tmpl field = bug_fields.qa_contact field_type = constants.FIELD_TYPE_USER hide_on_view = 1 append_content = 1 default = (bug.component_obj.default_qa_contact.id ? bug.component_obj.default_qa_contact.login : '') help = "https://wiki.mozilla.org/BMO/UserGuide/BugFields#qa_contact" %] [% END %] [% END %] [% WRAPPER fields_rhs %] [%# reporter %] [% INCLUDE bug_modal/field.html.tmpl field = bug_fields.reporter field_type = constants.FIELD_TYPE_USER view_only = 1 help = "https://wiki.mozilla.org/BMO/UserGuide/BugFields#reporter" %] [%# triage owner %] [% INCLUDE bug_modal/field.html.tmpl field = bug_fields.triage_owner field_type = constants.FIELD_TYPE_USER value = bug.component_obj.triage_owner view_only = 1 hide_on_view = bug.component_obj.triage_owner.login == "" help = "https://wiki.mozilla.org/BMO/UserGuide/BugFields#triage_owner" %] [%# needinfo %] [% WRAPPER bug_modal/field.html.tmpl container = 1 label = "NeedInfo From" hide_on_view = needinfo.size == 0 hide_on_edit = 1 %] [% INCLUDE bug_modal/flags.html.tmpl types = bug.flag_types.only("name", "needinfo") view_only = 1 %] [% END %] [% IF needinfo.size %] [% WRAPPER bug_modal/field.html.tmpl container = 1 label = "NeedInfo" hide_on_view = 1 help = "https://wiki.mozilla.org/BMO/UserGuide/BugFields#needinfo" %] [% END %] [% END %] [%# cc %] [% WRAPPER bug_modal/field.html.tmpl container = 1 label = "CC" hide_on_view = bug.cc.size == 0 help = "https://wiki.mozilla.org/BMO/UserGuide/BugFields#cc" %] [% IF user.id %] [% END %] [% IF bug.cc && bug.cc.size %] [% IF user.id %] [% END %] [% IF bug.cc.size == 1; is_cced ? "Just you" : "1 person"; ELSE; bug.cc.size _ " people" _ (is_cced ? " including you" : ""); END; %] [% ELSE %] Nobody [% END %] [% IF user.id %] [% END %] [% IF bug.cc && bug.cc.size %] [% END %] [% END %] [% END %] [% END %] [%# === references === %] [% sub = []; open_deps = bug.depends_on_obj.only("resolution", "").size; IF open_deps; sub.push("Depends on " _ open_deps _ " open bug" _ (open_deps == 1 ? "" : "s")); END; open_deps = bug.blocks_obj.only("resolution", "").size; IF open_deps; sub.push("Blocks " _ open_deps _ " open bug" _ (open_deps == 1 ? "" : "s")); END; open_regs = bug.regresses_obj.only("resolution", "").size; IF open_regs; sub.push("Regressed " _ open_regs _ " open bug" _ (open_regs == 1 ? "" : "s")); END; IF bug.regressed_by.size; sub.push("Regression"); END; IF bug.bug_file_loc != ""; loc_html = INCLUDE bug_url_link link_text="URL"; sub.push({ unfiltered => loc_html }); END; %] [% WRAPPER bug_modal/module.html.tmpl title = "References" subtitle = sub collapsed = 1 hide_on_view = !bug.dependson.size && !bug.blocked.size && !bug.regresses.size && !bug.regressed_by.size && !bug.duplicates.size && !bug.bug_file_loc && !bug.see_also.size; %] [% WRAPPER fields_lhs %] [%# dependencies %] [% INCLUDE bug_modal/field.html.tmpl field = bug_fields.dependson field_type = constants.FIELD_TYPE_BUG_LIST values = bug.depends_on_obj hide_on_view = bug.dependson.size == 0 help = "https://wiki.mozilla.org/BMO/UserGuide/BugFields#dependson" %] [% INCLUDE bug_modal/field.html.tmpl field = bug_fields.blocked field_type = constants.FIELD_TYPE_BUG_LIST values = bug.blocks_obj hide_on_view = bug.blocked.size == 0 help = "https://wiki.mozilla.org/BMO/UserGuide/BugFields#blocks" %] [% IF bug.dependson.size + bug.blocked.size > 0 %] [% WRAPPER bug_modal/field.html.tmpl name = "dependencytree" container = 1 label = "" %] Dependency tree / graph [% END %] [% END %] [%# regressions %] [% IF Param('use_regression_fields') %] [% INCLUDE bug_modal/field.html.tmpl field = bug_fields.regresses field_type = constants.FIELD_TYPE_BUG_LIST values = bug.regresses_obj hide_on_view = bug.regresses.size == 0 help = "https://wiki.mozilla.org/BMO/UserGuide/BugFields#regresses" %] [% INCLUDE bug_modal/field.html.tmpl field = bug_fields.regressed_by field_type = constants.FIELD_TYPE_BUG_LIST values = bug.regressed_by_obj hide_on_view = bug.regressed_by.size == 0 help = "https://wiki.mozilla.org/BMO/UserGuide/BugFields#regressed_by" %] [% END %] [%# duplicates %] [% IF bug.duplicates.size %] [% INCLUDE bug_modal/field.html.tmpl field = "duplicates" field_type = constants.FIELD_TYPE_BUG_LIST label = "Duplicates" values = bug.duplicates view_only = 1 help = "https://wiki.mozilla.org/BMO/UserGuide/BugFields#duplicates" %] [% END %] [% END %] [% WRAPPER fields_rhs %] [%# url %] [% WRAPPER bug_modal/field.html.tmpl field = bug_fields.bug_file_loc field_type = constants.FIELD_TYPE_FREETEXT hide_on_view = bug.bug_file_loc == "" default = "https://" help = "https://wiki.mozilla.org/BMO/UserGuide/BugFields#bug_file_loc" %] [% INCLUDE bug_url_link %] [% END %] [%# see also %] [% INCLUDE bug_modal/field.html.tmpl field = bug_fields.see_also field_type = constants.FIELD_TYPE_BUG_URLS values = bug.see_also hide_on_view = bug.see_also.size == 0 help = "https://wiki.mozilla.org/BMO/UserGuide/BugFields#see_also" %] [% END %] [% END %] [%# === details === %] [% sub = []; IF bug.keyword_objects.size; IF bug.keyword_objects.size <= 3; sub.push("Keywords: " _ bug.keyword_objects.pluck("name").join(", ")); ELSE; sub.push(bug.keyword_objects.size _ " keywords"); END; END; IF bug.status_whiteboard != ""; sub.push("Whiteboard: " _ bug.status_whiteboard.truncate(256, '…')); END; %] [% WRAPPER bug_modal/module.html.tmpl title = "Details" collapsed = 1 subtitle = sub %] [% WRAPPER fields_lhs %] [%# alias %] [% INCLUDE bug_modal/field.html.tmpl field = bug_fields.alias field_type = constants.FIELD_TYPE_FREETEXT hide_on_view = 1 short_width = 1 help = "https://wiki.mozilla.org/BMO/UserGuide/BugFields#alias" %] [%# keywords %] [% WRAPPER bug_modal/field.html.tmpl field = bug_fields.keywords field_type = constants.FIELD_TYPE_KEYWORDS hide_on_view = bug.keyword_objects.size == 0 help = basepath _ "describekeywords.cgi" %] [% IF bug.keyword_objects.size %] [% FOREACH keyword IN bug.keyword_objects.pluck("name") %] [%~ keyword FILTER html %][% ", " UNLESS loop.last %] [% END %] [% ELSE %] [% "---" FILTER html %] [% END %] [% END %] [%# whiteboards %] [% WRAPPER bug_modal/field.html.tmpl field = bug_fields.status_whiteboard field_type = constants.FIELD_TYPE_FREETEXT hide_on_view = bug.status_whiteboard == "" help = "https://wiki.mozilla.org/BMO/UserGuide/Whiteboard" %] [% bug.status_whiteboard == "" ? "---" : bug.status_whiteboard FILTER html %] [% END %] [% UNLESS cf_hidden_in_product('cf_qa_whiteboard', bug.product, bug.component, bug) %] [% rendered_custom_fields.push('cf_qa_whiteboard') %] [% INCLUDE bug_modal/field.html.tmpl field = bug_fields.cf_qa_whiteboard field_type = bug_fields.cf_qa_whiteboard.type hide_on_view = bug.cf_qa_whiteboard == "" %] [% END %] [%# cab review %] [% UNLESS cf_hidden_in_product('cf_cab_review', bug.product, bug.component, bug) %] [% rendered_custom_fields.push('cf_cab_review') %] [% IF bug.cf_cab_review == "---" %] [% WRAPPER bug_modal/field.html.tmpl field = bug_fields.cf_cab_review field_type = bug_fields.cf_cab_review.type container = 1 hide_on_view = 1 %] ServiceNow Change Request [% END %] [% ELSE %] [% INCLUDE bug_modal/field.html.tmpl field = bug_fields.cf_cab_review field_type = bug_fields.cf_cab_review.type %] [% END %] [% END %] [%# custom fields (except textarea) %] [% FOREACH field = custom_fields; NEXT IF field.type == constants.FIELD_TYPE_EXTENSION || field.type == constants.FIELD_TYPE_TEXTAREA; NEXT IF rendered_custom_fields.exists(field.name); NEXT IF cf_hidden_in_product(field.name, bug.product, bug.component, bug); cf_value = bug.${field.name}; IF field.type == constants.FIELD_TYPE_SINGLE_SELECT; has_value = cf_value != "---"; ELSIF field.type == constants.FIELD_TYPE_MULTI_SELECT; has_value = cf_value.size != 0; ELSE; has_value = cf_value != ""; END; INCLUDE bug_modal/field.html.tmpl field = field field_type = field.type hide_on_view = !has_value; END; %] [%# votes %] [% IF bug.product_obj.votesperuser %] [% WRAPPER bug_modal/field.html.tmpl container = 1 label = "Votes" name = "votes" help = "https://wiki.mozilla.org/BMO/UserGuide/BugFields#votes" %] [% bug.votes FILTER html %] [% IF user.id %] [% END %] [% END %] [% END %] [% Hook.process('details_lhs') %] [% END %] [% WRAPPER fields_rhs %] [%# flags %] [% WRAPPER bug_modal/field.html.tmpl name = "bug_flags" container = 1 label = terms.Bug _ " Flags" hide_on_view = !has_bug_flags %] [% INCLUDE bug_modal/flags.html.tmpl types = bug.flag_types.skip("name", "needinfo") %] [% END %] [% Hook.process('details_rhs') %] [% END %] [%# custom fields (textarea) %] [% FOREACH field IN custom_fields; NEXT IF field.type != constants.FIELD_TYPE_TEXTAREA; Hook.process('custom_field-' _ field.name); NEXT IF rendered_custom_fields.exists(field.name); INCLUDE bug_modal/field.html.tmpl field = field field_type = field.type hide_on_view = bug.${field.name} == "" || bug.${field.name} == "---"; END; %] [% END %] [%# === groups === %] [% WRAPPER bug_modal/module.html.tmpl title = "Security" collapsed = 1 subtitle = bug.groups_in.size ? bug.groups_in.pluck("description").join(", ") : "public" hide_on_view = bug.groups_in.size == 0 hide_on_edit = bug.groups.size == 0 && !bug.product_obj.default_security_group %] [% INCLUDE bug_modal/groups.html.tmpl %] [% END %] [%# === user story === %] [% IF bug.user_story_visible.0 %] [% WRAPPER bug_modal/module.html.tmpl title = "User Story" hide_on_view = bug.cf_user_story == "" collapsed = bug.cf_user_story == "" no_collapse_persist = 1 subtitle = "" %] [% IF user.id %]
[% IF bug.check_can_change_field('cf_user_story', 0, 1) %] [% END %] [% IF bug.cf_user_story != "" && bug.check_can_change_field('longdesc', 0, 1) %] [% END %]
[% END %]
[% bug.cf_user_story FILTER quoteUrls(bug) %]
[% IF user.id %] [% END %] [% END %] [% END %] [%# === timetracking === %] [% IF user.is_timetracker %] [% PROCESS bug/time.html.tmpl; sub = []; IF bug.estimated_time > 0; estimated_time = PROCESS formattimeunit time_unit = bug.estimated_time; sub.push("Estimated: $estimated_time"); END; IF bug.remaining_time > 0; remaining_time = PROCESS formattimeunit time_unit = bug.remaining_time; sub.push("Remaining: $remaining_time"); END; IF bug.deadline; sub.push("Deadline: " _ bug.deadline); END; %] [% WRAPPER bug_modal/module.html.tmpl title = "Time Tracking" collapsed = 1 no_collapse_persist = 1 subtitle = sub %] [% WRAPPER fields_lhs %] [% estimated_time = PROCESS formattimeunit time_unit = bug.estimated_time %] [% INCLUDE bug_modal/field.html.tmpl field = bug_fields.estimated_time field_type = constants.FIELD_TYPE_FREETEXT value = estimated_time hide_on_view = 0 short_width = 1 help = "https://wiki.mozilla.org/BMO/UserGuide/BugFields#estimated_time" %] [% current_estimate = PROCESS formattimeunit time_unit = (bug.actual_time + bug.remaining_time) %] [% INCLUDE bug_modal/field.html.tmpl label = "Current Est" value = current_estimate view_only = 1 help = "https://wiki.mozilla.org/BMO/UserGuide/BugFields#current_estimate" %] [% hours_worked = PROCESS formattimeunit time_unit = bug.actual_time %] [% WRAPPER bug_modal/field.html.tmpl field_type = constants.FIELD_TYPE_FREETEXT label = "Hours Worked" name = "work_time" value = '0.0' short_width = 1 help = "https://wiki.mozilla.org/BMO/UserGuide/BugFields#work_time" %] [% PROCESS formattimeunit time_unity = bug.actual_time %] [% END %] [% hours_left = PROCESS formattimeunit time_unit = bug.remaining_time %] [% INCLUDE bug_modal/field.html.tmpl field = bug_fields.remaining_time field_type = constants.FIELD_TYPE_FREETEXT value = hours_left short_width = 1 help = "https://wiki.mozilla.org/BMO/UserGuide/BugFields#remaining_time" %] [% END %] [% WRAPPER fields_rhs %] [% percentage_complete = PROCESS calculatepercentage act = bug.actual_time rem = bug.remaining_time %] [% INCLUDE bug_modal/field.html.tmpl label = "% Complete" value = percentage_complete view_only = 1 help = "https://wiki.mozilla.org/BMO/UserGuide/BugFields#percentage_complete" %] [% time_gain = PROCESS formattimeunit time_unit = bug.estimated_time - (bug.actual_time + bug.remaining_time) %] [% INCLUDE bug_modal/field.html.tmpl label = "Gain" value = time_gain view_only = 1 help = "https://wiki.mozilla.org/BMO/UserGuide/BugFields#gain" %] [% INCLUDE bug_modal/field.html.tmpl field = bug_fields.deadline field_type = constants.FIELD_TYPE_DATE value = bug.deadline help = "https://wiki.mozilla.org/BMO/UserGuide/BugFields#deadline" %]
Summarize time (including time for [% terms.bugs %] blocking this [% terms.bug %])
[% END %] [% END %] [% END %] [%# === extensions which are modules === %] [% Hook.process('module') %] [%# === attachments === %] [% IF active_attachments || obsolete_attachments || user.id %] [% sub = []; IF active_attachments + obsolete_attachments == 0; sub.push("No files"); END; IF active_attachments; sub.push(active_attachments _ " file" _ (active_attachments == 1 ? "" : "s")); END; IF obsolete_attachments; sub.push(obsolete_attachments _ " obsolete file" _ (obsolete_attachments == 1 ? "" : "s")); END; %] [% WRAPPER bug_modal/module.html.tmpl title = "Attachments" subtitle = sub %] [% INCLUDE bug_modal/attachments.html.tmpl active_attachments = active_attachments obsolete_attachments = obsolete_attachments %] [% END %] [% END %] [%# === initialize module visibility === %] [%# === top (between modules and comments) actions === %] [% IF user.id %]
[%+ Hook.process('top_actions') %]
[% END %] [% Hook.process('after_modules') %] [%# === comments === %] [% IF user.settings.comment_box_position.value == 'before_comments'; INCLUDE new_comment; END; INCLUDE bug_modal/activity_stream.html.tmpl stream=bug.activity_stream; IF user.settings.comment_box_position.value == 'after_comments'; INCLUDE new_comment; END; %] [%# === bottom actions === %]
[% IF user.id %]
[% END %] [%# === individual bugs addition === %] [% PROCESS "bug/tagging.html.tmpl" %] [%# === blocks === %] [% BLOCK new_comment %] [%# === new comment === %] [% IF user.id; INCLUDE bug_modal/new_comment.html.tmpl; ELSE; %]
You need to log in before you can comment on or make changes to this [% terms.bug %].
[% END; %] [%# === comment actions === %] [% IF user.id %]
[% IF bug.resolution == ""; seen_header = 0; FOREACH resolution IN ["FIXED", "INVALID", "DUPLICATE"]; NEXT UNLESS bug.choices.resolution.only("name", resolution).size; IF NOT seen_header; seen_header = 1; " Resolve as "; END; %] [% END; ELSE; IF bug.choices.bug_status.only("name", "VERIFIED").size && bug.bug_status != "VERIFIED"; %] [% END; IF bug.choices.bug_status.only("name", "REOPENED").size; %] [% END; END; %]
[% END %] [% END %] [% BLOCK fields_lhs %]
[% content FILTER none %]
[% END %] [% BLOCK fields_rhs %]
[% content FILTER none %]
[% END %] [% BLOCK bug_url_link %] [% IF !link_text.defined; link_text = bug.bug_file_loc FILTER pretty_url FILTER truncate(40); END; %] [% END %]