Commit edcc538e authored by lpsolit%gmail.com's avatar lpsolit%gmail.com

Bug 377026: Replace all occurences of status_descs.FOO by get_status("FOO")…

Bug 377026: Replace all occurences of status_descs.FOO by get_status("FOO") (next step in supporting custom bug statuses) - Patch by Fré©ric Buclin <LpSolit@gmail.com> r=gerv a=LpSolit
parent 8918a55e
......@@ -107,7 +107,7 @@
<td>
Enter the number of votes [% terms.abug %] in this product needs to
automatically get out of the
<a href="page.cgi?id=fields.html#status">[% status_descs.UNCONFIRMED FILTER html %]</a>
<a href="page.cgi?id=fields.html#status">[% get_status("UNCONFIRMED") FILTER html %]</a>
state.<br>
<input size="5" maxlength="5" name="votestoconfirm"
value="[% product.votestoconfirm FILTER html %]">
......
......@@ -83,7 +83,7 @@
change.fieldname == 'work_time' %]
[% PROCESS formattimeunit time_unit=change.removed %]
[% ELSIF change.fieldname == 'bug_status' %]
[% status_descs.${change.removed} FILTER html %]
[% get_status(change.removed) FILTER html %]
[% ELSIF change.fieldname == 'resolution' %]
[% get_resolution(change.removed) FILTER html %]
[% ELSIF change.fieldname == 'blocked' ||
......@@ -103,7 +103,7 @@
change.fieldname == 'work_time' %]
[% PROCESS formattimeunit time_unit=change.added %]
[% ELSIF change.fieldname == 'bug_status' %]
[% status_descs.${change.added} FILTER html %]
[% get_status(change.added) FILTER html %]
[% ELSIF change.fieldname == 'resolution' %]
[% get_resolution(change.added) FILTER html %]
[% ELSIF change.fieldname == 'blocked' ||
......
......@@ -264,7 +264,7 @@ function handleWantsAttachment(wants_attachment) {
<input type="hidden" name="bug_status"
value="[% default.bug_status FILTER html %]">
<td align="right" valign="top"><strong>Initial State:</strong></td>
<td valign="top">[% status_descs.${default.bug_status} FILTER html %]</td>
<td valign="top">[% get_status(default.bug_status) FILTER html %]</td>
[% ELSE %]
[% sel = { description => 'Initial State', name => 'bug_status' } %]
[% INCLUDE select %]
......@@ -600,7 +600,7 @@ function handleWantsAttachment(wants_attachment) {
<option value="[% x FILTER html %]"
[% " selected=\"selected\"" IF x == default.${sel.name} %]>
[% IF sel.name == "bug_status" %]
[% status_descs.$x FILTER html %]
[% get_status(x) FILTER html %]
[% ELSE %]
[% x FILTER html %]
[% END %]</option>
......
......@@ -35,7 +35,7 @@
[% PROCESS initial_action %]
<input type="radio" id="knob-confirm" name="knob" value="confirm">
<label for="knob-confirm">
Confirm [% terms.bug %] (change status to <b>[% status_descs.NEW FILTER html %]</b>)
Confirm [% terms.bug %] (change status to <b>[% get_status("NEW") FILTER html %]</b>)
</label>
<br>
[% knum = knum + 1 %]
......@@ -48,7 +48,7 @@
<label for="knob-accept">
Accept [% terms.bug %] (
[% IF bug.isunconfirmed %]confirm [% terms.bug %], and [% END %]change
status to <b>[% status_descs.ASSIGNED FILTER html %]</b>)
status to <b>[% get_status("ASSIGNED") FILTER html %]</b>)
</label>
<br>
[% knum = knum + 1 %]
......@@ -61,7 +61,7 @@
<input type="radio" id="knob-clear" name="knob" value="clearresolution">
<label for="knob-clear">
Clear the resolution (remove the current resolution of
<b>[% resolution_descs.${bug.resolution} FILTER html %]</b>)
<b>[% get_resolution(bug.resolution) FILTER html %]</b>)
</label>
<br>
[% knum = knum + 1 %]
......@@ -97,7 +97,7 @@
[% IF bug.isunconfirmed && bug.user.canconfirm %]
&nbsp;&nbsp;&nbsp;&nbsp;<input type="checkbox" id="andconfirm" name="andconfirm">
<label for="andconfirm">
and confirm [% terms.bug %] (change status to <b>[% status_descs.NEW FILTER html %]</b>)
and confirm [% terms.bug %] (change status to <b>[% get_status("NEW") FILTER html %]</b>)
</label>
<br>
[% END %]
......@@ -113,7 +113,7 @@
[% IF bug.isunconfirmed && bug.user.canconfirm %]
&nbsp;&nbsp;&nbsp;&nbsp;<input type="checkbox" id="compconfirm" name="compconfirm">
<label for="compconfirm">
and confirm [% terms.bug %] (change status to <b>[% status_descs.NEW FILTER html %]</b>)
and confirm [% terms.bug %] (change status to <b>[% get_status("NEW") FILTER html %]</b>)
</label>
<br>
[% END %]
......@@ -142,7 +142,7 @@
[% PROCESS initial_action %]
<input type="radio" id="knob-verify" name="knob" value="verify">
<label for="knob-verify">
Mark [% terms.bug %] as <b>[% status_descs.VERIFIED FILTER html %]</b>
Mark [% terms.bug %] as <b>[% get_status("VERIFIED") FILTER html %]</b>
</label>
<br>
[% knum = knum + 1 %]
......@@ -151,7 +151,7 @@
[% PROCESS initial_action %]
<input type="radio" id="knob-close" name="knob" value="close">
<label for="knob-close">
Mark [% terms.bug %] as <b>[% status_descs.CLOSED FILTER html %]</b>
Mark [% terms.bug %] as <b>[% get_status("CLOSED") FILTER html %]</b>
</label>
<br>
[% knum = knum + 1 %]
......@@ -177,7 +177,7 @@
[% IF !initial_action_shown %]
<input type="radio" id="knob-leave" name="knob" value="none" checked="checked">
<label for="knob-leave">
Leave as <b>[% status_descs.${bug.bug_status} FILTER html %]&nbsp;
Leave as <b>[% get_status(bug.bug_status) FILTER html %]&nbsp;
[% get_resolution(bug.resolution) FILTER html %]</b>
</label>
<br>
......
......@@ -117,7 +117,7 @@
<tr>
<th>[% field_descs.bug_status FILTER html %]:</th>
<td>
[% status_descs.${bug.bug_status} FILTER html %]
[% get_status(bug.bug_status) FILTER html %]
[%+ get_resolution(bug.resolution) FILTER html %]
</td>
......
......@@ -31,8 +31,8 @@ You have one or more [% terms.bugs %] assigned to you in the [% terms.Bugzilla %
[% terms.bug %] tracking system ([% Param("urlbase") %]) that require
attention.
All of these [% terms.bugs %] are in the [% status_descs.NEW %] or
[% status_descs.REOPENED %] state, and have not been
All of these [% terms.bugs %] are in the [% get_status("NEW") %] or
[% get_status("REOPENED") %] state, and have not been
touched in [% Param("whinedays") %] days or more.
You need to take a look at them, and decide on an initial action.
......@@ -47,7 +47,7 @@ Generally, this means one of three things:
(3) You decide the [% terms.bug %] belongs to you, but you can't solve it this moment.
Just use the "Accept [% terms.bug %]" command.
To get a list of all [% status_descs.NEW %]/[% status_descs.REOPENED %] [%+ terms.bugs %], you can use this URL (bookmark
To get a list of all [% get_status("NEW") %]/[% get_status("REOPENED") %] [%+ terms.bugs %], you can use this URL (bookmark
it if you like!):
[% Param("urlbase") %]buglist.cgi?bug_status=NEW&bug_status=REOPENED&assigned_to=[% email %]
......@@ -55,7 +55,7 @@ it if you like!):
Or, you can use the general query page, at
[%+ Param("urlbase") %]query.cgi
Appended below are the individual URLs to get to all of your [% status_descs.NEW %] [%+ terms.bugs %]
Appended below are the individual URLs to get to all of your [% get_status("NEW") %] [%+ terms.bugs %]
that haven't been touched for a week or more.
You will get this message once a day until you've dealt with these [% terms.bugs %]!
......
......@@ -92,6 +92,8 @@
"VERIFIED" => "VERIFIED",
"CLOSED" => "CLOSED" } %]
[% MACRO get_status(status) GET status_descs.$status || status %]
[% resolution_descs = { "FIXED" => "FIXED",
"INVALID" => "INVALID",
"WONTFIX" => "WONTFIX",
......
......@@ -282,7 +282,7 @@
[% knum = knum + 1 %]
<input id="knob-confirm" type="radio" name="knob" value="confirm">
<label for="knob-confirm">
Confirm [% terms.bugs %] (change status to <b>[% status_descs.NEW FILTER html %]</b>)
Confirm [% terms.bugs %] (change status to <b>[% get_status("NEW") FILTER html %]</b>)
</label><br>
[% END %]
......@@ -292,7 +292,7 @@
[% knum = knum + 1 %]
<input id="knob-accept" type="radio" name="knob" value="accept">
<label for="knob-accept">
Accept [% terms.bugs %] (change status to <b>[% status_descs.ASSIGNED FILTER html %]</b>)
Accept [% terms.bugs %] (change status to <b>[% get_status("ASSIGNED") FILTER html %]</b>)
</label><br>
[% knum = knum + 1 %]
......@@ -326,14 +326,14 @@
[% IF bugstatuses.contains('RESOLVED') %]
[% knum = knum + 1 %]
<input id="knob-verify" type="radio" name="knob" value="verify">
<label for="knob-verify">Mark [% terms.bugs %] as <b>[% status_descs.VERIFIED FILTER html %]</b></label><br>
<label for="knob-verify">Mark [% terms.bugs %] as <b>[% get_status("VERIFIED") FILTER html %]</b></label><br>
[% END %]
[% END %]
[% IF !bugstatuses.containsany(openstates) AND !bugstatuses.contains('CLOSED') %]
[% knum = knum + 1 %]
<input id="knob-close" type="radio" name="knob" value="close">
<label for="knob-close">Mark [% terms.bugs %] as <b>[% status_descs.CLOSED FILTER html %]</b></label><br>
<label for="knob-close">Mark [% terms.bugs %] as <b>[% get_status("CLOSED") FILTER html %]</b></label><br>
[% END %]
[% knum = knum + 1 %]
......
......@@ -190,7 +190,7 @@
column == 'estimated_time' %]
[% PROCESS formattimeunit time_unit=bug.$column %]
[% ELSIF column == 'bug_status' %]
[%- status_descs.${bug.$column}.truncate(abbrev.$column.maxlength, abbrev.$column.ellipsis) FILTER html %]
[%- get_status(bug.$column).truncate(abbrev.$column.maxlength, abbrev.$column.ellipsis) FILTER html %]
[% ELSIF column == 'resolution' %]
[%- get_resolution(bug.$column).truncate(abbrev.$column.maxlength, abbrev.$column.ellipsis) FILTER html %]
[% ELSE %]
......
......@@ -57,8 +57,8 @@
<ul>
<li><b>It's Reproducible.</b> Engineers usually prefer to fix [% terms.bugs %]
they can actually see. If an engineer can't reproduce the [% terms.bug %],
it'll probably be stamped "[% resolution_descs.WORKSFORME FILTER html %]" or
"[% resolution_descs.INVALID FILTER html %]".<br>
it'll probably be stamped "[% get_resolution("WORKSFORME") FILTER html %]" or
"[% get_resolution("INVALID") FILTER html %]".<br>
<br>
</li>
......
......@@ -55,45 +55,47 @@ cycle of [% terms.abug %].
<td>
<dl>
<dt>
<b>[% status_descs.UNCONFIRMED FILTER html %]</b>
<b>[% get_status("UNCONFIRMED") FILTER html %]</b>
</dt>
<dd>
This [% terms.bug %] has recently been added to the database.
Nobody has validated that this [% terms.bug %] is true. Users
who have the "canconfirm" permission set may confirm
this [% terms.bug %], changing its state to [% status_descs.NEW FILTER html %]. Or, it may be
directly resolved and marked [% status_descs.RESOLVED FILTER html %].
this [% terms.bug %], changing its state to [% get_status("NEW") FILTER html %]. Or, it may be
directly resolved and marked [% get_status("RESOLVED") FILTER html %].
</dd>
<dt>
<b>[% status_descs.NEW FILTER html %]</b>
<b>[% get_status("NEW") FILTER html %]</b>
</dt>
<dd>
This [% terms.bug %] has recently been added to the assignee's
list of [% terms.bugs %] and must be processed. [% terms.Bugs %] in
this state may be accepted, and become <b>[% status_descs.ASSIGNED FILTER html %]</b>, passed
on to someone else, and remain <b>[% status_descs.NEW FILTER html %]</b>, or resolved and marked
<b>[% status_descs.RESOLVED FILTER html %]</b>.
this state may be accepted, and become <b>[% get_status("ASSIGNED") FILTER html %]</b>, passed
on to someone else, and remain <b>[% get_status("NEW") FILTER html %]</b>, or resolved and marked
<b>[% get_status("RESOLVED") FILTER html %]</b>.
</dd>
<dt>
<b>[% status_descs.ASSIGNED FILTER html %]</b>
<b>[% get_status("ASSIGNED") FILTER html %]</b>
</dt>
<dd>
This [% terms.bug %] is not yet resolved, but is assigned to the
proper person. From here [% terms.bugs %] can be given to another
person and become <b>[% status_descs.NEW FILTER html %]</b>, or resolved and become <b>[% status_descs.RESOLVED FILTER html %]</b>.
person and become <b>[% get_status("NEW") FILTER html %]</b>, or
resolved and become <b>[% get_status("RESOLVED") FILTER html %]</b>.
</dd>
<dt>
<b>[% status_descs.REOPENED FILTER html %]</b>
<b>[% get_status("REOPENED") FILTER html %]</b>
</dt>
<dd>
This [% terms.bug %] was once resolved, but the resolution was
deemed incorrect. For example, a <b>[% status_descs.WORKSFORME FILTER html %]</b> [% terms.bug %] is
<b>[% status_descs.REOPENED FILTER html %]</b> when more information shows up and
deemed incorrect. For example, a <b>[% get_status("WORKSFORME") FILTER html %]</b> [% terms.bug %] is
<b>[% get_status("REOPENED") FILTER html %]</b> when more information shows up and
the [% terms.bug %] is now reproducible. From here [% terms.bugs %] are
either marked <b>[% status_descs.ASSIGNED FILTER html %]</b> or <b>[% status_descs.RESOLVED FILTER html %]</b>.
either marked <b>[% get_status("ASSIGNED") FILTER html %]</b> or
<b>[% get_status("RESOLVED") FILTER html %]</b>.
</dd>
</dl>
</td>
......@@ -114,33 +116,34 @@ cycle of [% terms.abug %].
<td>
<dl>
<dt>
<b>[% status_descs.RESOLVED FILTER html %]</b>
<b>[% get_status("RESOLVED") FILTER html %]</b>
</dt>
<dd>
A resolution has been taken, and it is awaiting verification by
QA. From here [% terms.bugs %] are either re-opened and become
<b>[% status_descs.REOPENED FILTER html %]</b>, are marked <b>[% status_descs.VERIFIED FILTER html %]</b>, or are closed for
good and marked <b>[% status_descs.CLOSED FILTER html %]</b>.
<b>[% get_status("REOPENED") FILTER html %]</b>, are marked
<b>[% get_status("VERIFIED") FILTER html %]</b>, or are closed for
good and marked <b>[% get_status("CLOSED") FILTER html %]</b>.
</dd>
<dt>
<b>[% status_descs.VERIFIED FILTER html %]</b>
<b>[% get_status("VERIFIED") FILTER html %]</b>
</dt>
<dd>
QA has looked at the [% terms.bug %] and the resolution and
agrees that the appropriate resolution has been taken. [% terms.Bugs %] remain
in this state until the product they were reported
against actually ships, at which point they become
<b>[% status_descs.CLOSED FILTER html %]</b>.
<b>[% get_status("CLOSED") FILTER html %]</b>.
</dd>
<dt>
<b>[% status_descs.CLOSED FILTER html %]</b>
<b>[% get_status("CLOSED") FILTER html %]</b>
</dt>
<dd>
The [% terms.bug %] is considered dead, the resolution is correct.
Any zombie [% terms.bugs %] who choose to walk the earth again must
do so by becoming <b>[% status_descs.REOPENED FILTER html %]</b>.
do so by becoming <b>[% get_status("REOPENED") FILTER html %]</b>.
</dd>
</dl>
</td>
......@@ -292,12 +295,13 @@ others.
<p>
This is the person in charge of resolving the [% terms.bug %]. Every time
this field changes, the status changes to <b>[% status_descs.NEW FILTER html %]</b> to make it
this field changes, the status changes to <b>[% get_status("NEW") FILTER html %]</b> to make it
easy to see which new [% terms.bugs %] have appeared on a person's list.</p>
<p>
The default status for queries is set to [% status_descs.NEW FILTER html %], [% descs.bug_status_descs.ASSIGNED FILTER html %] and
[% status_descs.REOPENED FILTER html %]. When searching for [% terms.bugs %] that have been resolved or
The default status for queries is set to [% get_status("NEW") FILTER html %],
[%+ get_status("ASSIGNED") FILTER html %] and [% get_status("REOPENED") FILTER html %].
When searching for [% terms.bugs %] that have been resolved or
verified, remember to set the status field appropriately.
</p>
......
......@@ -29,7 +29,7 @@
[% IF col_field == 'bug_status' %]
[% FOR i IN [ 0 .. data.0.0.max ] %]
[% data.0.0.$i = status_descs.${data.0.0.$i} %]
[% data.0.0.$i = get_status(data.0.0.$i) %]
[% END %]
[% END %]
......@@ -41,7 +41,7 @@
[% IF row_field == 'bug_status' %]
[% FOR i IN [ 0 .. row_names.max ] %]
[% row_names.$i = status_descs.${row_names.$i} %]
[% row_names.$i = get_status(row_names.$i) %]
[% END %]
[% END %]
......
......@@ -29,7 +29,7 @@
[% IF col_field == 'bug_status' %]
[% FOR i IN [ 0 .. data.0.0.max ] %]
[% data.0.0.$i = status_descs.${data.0.0.$i} %]
[% data.0.0.$i = get_status(data.0.0.$i) %]
[% END %]
[% END %]
......@@ -41,7 +41,7 @@
[% IF row_field == 'bug_status' %]
[% FOR i IN [ 0 .. row_names.max ] %]
[% row_names.$i = status_descs.${row_names.$i} %]
[% row_names.$i = get_status(row_names.$i) %]
[% END %]
[% END %]
......
......@@ -25,7 +25,7 @@
[% IF col_field == 'bug_status' %]
[% FOR i IN [ 0 .. data.0.0.max ] %]
[% data.0.0.$i = status_descs.${data.0.0.$i} %]
[% data.0.0.$i = get_status(data.0.0.$i) %]
[% END %]
[% END %]
......
......@@ -42,7 +42,7 @@
[% FOREACH col = col_names -%]
[% colsepchar %]
[% IF col_field == 'bug_status' %]
[% status_descs.$col FILTER csv -%]
[% get_status(col) FILTER csv -%]
[% ELSIF col_field == 'resolution' %]
[% get_resolution(col) FILTER csv -%]
[% ELSE %]
......@@ -55,7 +55,7 @@
[% FOREACH row = row_names %]
[% IF row_field == 'bug_status' %]
[% status_descs.$row FILTER csv -%]
[% get_status(row) FILTER csv -%]
[% ELSIF row_field == 'resolution' %]
[% get_resolution(row) FILTER csv -%]
[% ELSE %]
......
......@@ -86,7 +86,7 @@
[% col_idx = 1 - col_idx %]
<td class="[% classes.$row_idx.$col_idx %]">
[% IF col_field == 'bug_status' %]
[% status_descs.$col FILTER html FILTER replace('^ $','&nbsp;') %]
[% get_status(col) FILTER html FILTER replace('^ $','&nbsp;') %]
[% ELSIF col_field == 'resolution' %]
[% get_resolution(col) FILTER html FILTER replace('^ $','&nbsp;') %]
[% ELSE %]
......@@ -107,7 +107,7 @@
<tr>
<td class="[% classes.$row_idx.$col_idx %]" align="right">
[% IF row_field == 'bug_status' %]
[% status_descs.$row FILTER html FILTER replace('^ $','&nbsp;') %]
[% get_status(row) FILTER html FILTER replace('^ $','&nbsp;') %]
[% ELSIF row_field == 'resolution' %]
[% get_resolution(row) FILTER html FILTER replace('^ $','&nbsp;') %]
[% ELSE %]
......
......@@ -631,7 +631,7 @@ function doOnSelectProduct(selectmode) {
<option value="[% name FILTER html %]"
[% " selected" IF lsearch(default.${sel.name}, name) != -1 %]>
[% IF sel.name == "bug_status" %]
[% status_descs.${name} FILTER html %]
[% get_status(name) FILTER html %]
[% ELSIF sel.name == "resolution" %]
[% get_resolution(name) FILTER html %]
[% ELSE %]
......
......@@ -83,7 +83,7 @@
<td align="left">[% bug.priority FILTER html %]</td>
<td align="left">[% bug.rep_platform FILTER html %]</td>
<td align="left">[% bug.$assignee_login_string FILTER html %]</td>
<td align="left">[% status_descs.${bug.bug_status} FILTER html %]</td>
<td align="left">[% get_status(bug.bug_status) FILTER html %]</td>
<td align="left">[% get_resolution(bug.resolution) FILTER html %]</td>
<td align="left">[% bug.short_desc FILTER html %]</td>
</tr>
......
......@@ -58,7 +58,7 @@
Severity: [%+ bug.bug_severity -%]
Platform: [%+ bug.rep_platform %]
Assignee: [%+ bug.$assignee_login_string %]
Status: [%+ status_descs.${bug.bug_status} %]
Status: [%+ get_status(bug.bug_status) %]
[%- IF bug.resolution -%] Resolution: [% get_resolution(bug.resolution) -%]
[%- END %]
Summary: [% bug.short_desc %]
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment