Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
bugzilla
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
etersoft
bugzilla
Commits
d5ea314f
Commit
d5ea314f
authored
Jul 22, 2009
by
mkanat%bugzilla.org
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Bug 505484: Fix the return value of Bug.history to be more like the return value of Bug.get
Patch by Max Kanat-Alexander <mkanat@bugzilla.org> r=dkl, r=LpSolit, a=mkanat
parent
190a7ed5
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
6 deletions
+21
-6
Bug.pm
Bugzilla/WebService/Bug.pm
+21
-6
No files found.
Bugzilla/WebService/Bug.pm
View file @
d5ea314f
...
...
@@ -196,14 +196,16 @@ sub history {
defined
$ids
||
ThrowCodeError
(
'param_required'
,
{
param
=>
'ids'
});
my
@return
;
foreach
my
$bug_id
(
@$ids
)
{
my
%
item
;
my
$bug
=
Bugzilla::
Bug
->
check
(
$bug_id
);
$bug_id
=
$bug
->
id
;
$item
{
id
}
=
$self
->
type
(
'int'
,
$bug_id
);
my
(
$activity
)
=
Bugzilla::Bug::
GetBugActivity
(
$bug_id
);
$item
{
$bug_id
}
=
[]
;
my
@history
;
foreach
my
$changeset
(
@$activity
)
{
my
%
bug_history
;
$bug_history
{
when
}
=
$self
->
type
(
'dateTime'
,
$changeset
->
{
when
});
...
...
@@ -224,8 +226,10 @@ sub history {
push
(
@
{
$bug_history
{
changes
}},
$change
);
}
push
(
@
{
$item
{
$bug_id
}},
\%
bug_history
);
}
push
(
@history
,
\%
bug_history
);
}
$item
{
history
}
=
\
@history
;
# alias is returned in case users passes a mixture of ids and aliases
# then they get to know which bug activity relates to which value
...
...
@@ -1079,17 +1083,26 @@ try to specify an alias. (It will be error 100.)
=item B<Returns>
A hash containing a single element, C<bugs>. This is a hash of hashes.
Each hash has the numeric bug id as a key, and contains the following
items:
A hash containing a single element, C<bugs>. This is an array of hashes,
containing the following keys:
=over
=item id
C<int> The numeric id of the bug.
=item alias
C<string> The alias of this bug. If there is no alias or aliases are
disabled in this Bugzilla, this will be undef.
=item history
C<array> An array of hashes, each hash having the following keys:
=over
=item when
C<dateTime> The date the bug activity/change happened.
...
...
@@ -1129,6 +1142,8 @@ present in this hash.
=back
=back
=item B<Errors>
The same as L</get>.
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment