[%# 1.0@bugzilla.org %] [%# The contents of this file are subject to the Mozilla Public # License Version 1.1 (the "License"); you may not use this file # except in compliance with the License. You may obtain a copy of # the License at http://www.mozilla.org/MPL/ # # Software distributed under the License is distributed on an "AS # IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or # implied. See the License for the specific language governing # rights and limitations under the License. # # The Original Code is the Bugzilla Bug Tracking System. # # The Initial Developer of the Original Code is Netscape Communications # Corporation. Portions created by Netscape are # Copyright (C) 1998 Netscape Communications Corporation. All # Rights Reserved. # # Contributor(s): Gervase Markham # Vaskin Kissoyan # Frédéric Buclin #%] [% PROCESS global/variables.none.tmpl %]
[% initial_action_shown = 0 %] [%# These actions are based on the current custom workflow. %] [% FOREACH bug_status = bug.status.can_change_to %] [% NEXT IF bug.isunconfirmed && bug_status.is_open && !bug.user.canconfirm %] [% NEXT IF bug.isopened && !bug.isunconfirmed && bug_status.is_open && !bug.user.canedit %] [% NEXT IF (!bug_status.is_open || !bug.isopened) && !bug.user.canedit && !bug.user.isreporter %] [%# Special hack to only display UNCO or REOP when reopening, but not both; # for compatibility with older versions. %] [% NEXT IF !bug.isopened && (bug.everconfirmed && bug_status.name == "UNCONFIRMED" || !bug.everconfirmed && bug_status.name == "REOPENED") %] [% PROCESS initial_action %] [% NEXT IF bug_status.name == bug.bug_status %] [% IF bug.isopened && !bug_status.is_open %] and set the resolution to [% PROCESS select_resolution field = "knob_${bug_status.id}" %] [% END %]
[% END %] [%# These actions are special and are independent of the workflow. %] [% IF bug.user.canedit || bug.user.isreporter %] [% IF bug.isopened %] [% IF bug.resolution %] [% PROCESS initial_action %]
[% END %] [% ELSE %] [% IF bug.resolution != "MOVED" || bug.user.canmove %] [% PROCESS initial_action %] [% PROCESS select_resolution field = "knob_change_resolution" %]
[% END %] [% END %] [% PROCESS duplicate %] [% END %]
[% IF bug.user.canmove %] [% END %]
[%# Common actions %] [% BLOCK initial_action %] [%# Only show 'Leave as' action in combination with another knob %] [% IF !initial_action_shown %]
[% initial_action_shown = 1 %] [% END %] [% END %] [% BLOCK select_resolution %] [% END %] [% BLOCK duplicate %]
[% END %]