diff options
-rw-r--r-- | Bugzilla/WebService/Bug.pm | 17 | ||||
-rw-r--r-- | extensions/MyDashboard/lib/WebService.pm | 2 |
2 files changed, 11 insertions, 8 deletions
diff --git a/Bugzilla/WebService/Bug.pm b/Bugzilla/WebService/Bug.pm index 0202afc59..aa5fd49c4 100644 --- a/Bugzilla/WebService/Bug.pm +++ b/Bugzilla/WebService/Bug.pm @@ -53,6 +53,7 @@ use constant PRODUCT_SPECIFIC_FIELDS => qw(version target_milestone component); use constant DATE_FIELDS => { comments => ['new_since'], + history => ['new_since'], search => ['last_change_time', 'creation_time'], }; @@ -407,7 +408,7 @@ sub history { $bug_id = $bug->id; $item{id} = $self->type('int', $bug_id); - my ($activity) = Bugzilla::Bug::GetBugActivity($bug_id, undef, $params->{start_time}); + my ($activity) = Bugzilla::Bug::GetBugActivity($bug_id, undef, $params->{new_since}); my @history; foreach my $changeset (@$activity) { @@ -2446,17 +2447,17 @@ An array of numbers and strings. If an element in the array is entirely numeric, it represents a bug_id from the Bugzilla database to fetch. If it contains any non-numeric characters, it is considered to be a bug alias instead, and the data bug -with that alias will be loaded. +with that alias will be loaded. + +item C<new_since> + +C<dateTime> If specified, the method will only return changes I<newer> +than this time. Note that it's possible for aliases to be disabled in Bugzilla, in which case you will be told that you have specified an invalid bug_id if you try to specify an alias. (It will be error 100.) -=item C<start_time> - -An optional C<datetime> string that only shows changes at and after a specific -time. - =back =item B<Returns> @@ -3869,6 +3870,8 @@ rules don't allow that change. =item REST API call added Bugzilla B<5.0>. +=item Added C<new_since> parameter if Bugzilla B<5.0>. + =back =back diff --git a/extensions/MyDashboard/lib/WebService.pm b/extensions/MyDashboard/lib/WebService.pm index 41d327446..6c8879657 100644 --- a/extensions/MyDashboard/lib/WebService.pm +++ b/extensions/MyDashboard/lib/WebService.pm @@ -42,7 +42,7 @@ sub run_bug_query { foreach my $b (@$bugs) { my $last_changes = {}; my $activity = $self->history({ ids => [ $b->{bug_id} ], - start_time => $b->{changeddate} }); + new_since => $b->{changeddate} }); if (@{$activity->{bugs}[0]{history}}) { my $change_set = $activity->{bugs}[0]{history}[0]; $last_changes->{activity} = $change_set->{changes}; |