Bug 63249

git-svn-id: svn://svn.office.custis.ru/3rdparty/bugzilla.org/trunk@1185 6955db30-a419-402b-8a0d-67ecbb4d7f56
master
vfilippov 2010-12-20 19:05:49 +00:00
parent f1bf017b59
commit 32930d4107
5 changed files with 22 additions and 11 deletions

View File

@ -3013,6 +3013,9 @@ sub comments {
my $from = datetime_from($params->{after});
@comments = grep { datetime_from($_->creation_ts) > $from } @comments;
}
elsif ($params->{start_at}) {
splice(@comments, 0, $params->{start_at});
}
if ($params->{to}) {
my $to = datetime_from($params->{to});
@comments = grep { datetime_from($_->creation_ts) <= $to } @comments;

View File

@ -991,12 +991,22 @@ sub extproduct { return $_[0]->{'extproduct'}; }
#### Subroutines ######
###############################
sub extproduct_obj
{
my $self = shift;
if (!exists $self->{extproduct_obj})
{
$self->{extproduct_obj} = $self->{extproduct} ? $self->new($self->{extproduct}) : undef;
}
return $self->{extproduct_obj};
}
sub enterable_extproduct_name
{
my $self = shift;
if (!exists $self->{extproduct_name})
{
my $n = $self->{extproduct} ? $self->new($self->{extproduct})->name : '';
my $n = $self->{extproduct} ? $self->extproduct_obj->name : '';
$n = '' if $n ne '' && !Bugzilla->user->can_enter_product($n);
$self->{extproduct_name} = $n;
}

View File

@ -98,7 +98,6 @@ if (Bugzilla->params->{'useclassification'}
exit;
}
#
# action = '' -> Show a nice list of products, unless a product
# is already specified (then edit it)
@ -124,9 +123,6 @@ if (!$action && !$product_name) {
exit;
}
#
# action='add' -> present form for parameters for new product
#
@ -153,7 +149,6 @@ if ($action eq 'add') {
exit;
}
#
# action='new' -> add product entered in the 'action=add' screen
#

View File

@ -29,7 +29,7 @@
<td><b>[% classification.name FILTER html %]</b></td>
</tr>
[% END %]
<tr>
<th align="right">Product:</th>
<td><input size="64" maxlength="64" name="product"
@ -96,7 +96,7 @@
<td>
<select name="extproduct">
<option value="">---</option>
[% FOREACH prod = Bugzilla.user.get_enterable_products %]
[% FOREACH prod = Bugzilla.user.get_editable_products %]
<option value="[% prod.id %]" [% ' selected="selected"' IF prod.id == product.extproduct %]>[% prod.name | html %]</option>
[% END %]
</select>

View File

@ -75,7 +75,7 @@
'[% product.default_milestone FILTER html %]'.
</p>
[% END %]
[% IF changes.votesperuser.defined %]
<p>
Updated votes per user from
@ -111,7 +111,7 @@
[% ELSE %]
The product no longer allows the
[%+ display_value('bug_status', 'UNCONFIRMED') FILTER html %] status.
Note that any
Note that any
<a href="buglist.cgi?product=
[%- product.name FILTER url_quote %]&amp;bug_status=UNCONFIRMED">
[%- terms.bugs %] that currently have the
@ -133,6 +133,10 @@
<p>Product is now preferred to be [% product.notimetracking ? "not " : "" %] time-tracked.</p>
[% END %]
[% IF changes.extproduct.defined %]
<p>External product is [% IF changes.extproduct %]set to [% product.extproduct_obj.name | html %][% ELSE %]cleared[% END %].</p>
[% END %]
[% IF !changes.keys.size %]
<p>Nothing changed for product '[% product.name FILTER html %]'.</p>
[% END %]
@ -141,7 +145,6 @@
not very scalable. We could have a _lot_, and we just list them all.
One day we should limit this perhaps, or have a more scalable display %]
[% IF checkvotes %]
<hr>