Closed
Bug 424079
Opened 16 years ago
Closed 16 years ago
Ability to get history of bug activity in the WebService (Bug.history)
Categories
(Bugzilla :: WebService, enhancement)
Tracking
()
RESOLVED
FIXED
Bugzilla 3.4
People
(Reporter: nelhawar, Assigned: nelhawar)
References
(Blocks 1 open bug)
Details
Attachments
(1 file, 5 obsolete files)
4.94 KB,
patch
|
mkanat
:
review+
|
Details | Diff | Splinter Review |
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.0.9) Gecko/20070209 Fedora/1.5.0.9-3.fc6 Firefox/1.5.0.9 pango-text Build Identifier: Need a new function to get bug activity in the webservice interface, Bugzilla::WebService::Bug::get_activity() Reproducible: Always
Assignee | ||
Comment 1•16 years ago
|
||
Attachment #310734 -
Flags: review?(mkanat)
Attachment #310734 -
Flags: review?(LpSolit)
Updated•16 years ago
|
Assignee: webservice → nelhawar
Severity: normal → enhancement
Status: UNCONFIRMED → NEW
Ever confirmed: true
Target Milestone: --- → Bugzilla 4.0
Version: unspecified → 3.1.3
Comment 2•16 years ago
|
||
Comment on attachment 310734 [details] [diff] [review] Bugzilla::WebService::Bug::get_activity + POD Looks good, works fine. r=LpSolit
Attachment #310734 -
Flags: review?(LpSolit) → review+
Updated•16 years ago
|
Status: NEW → ASSIGNED
Flags: approval?
Comment 3•16 years ago
|
||
Noura, Frederic, once this approved I can go ahead and check this in for you. Who needs to approve, Max? Thanks Dave
Comment 4•16 years ago
|
||
Comment on attachment 310734 [details] [diff] [review] Bugzilla::WebService::Bug::get_activity + POD >+ ( $item{operations}, $item{incomplete_data} ) = Bugzilla::Bug::GetBugActivity($bug_id); incomplete_data does not need to be part of this API. >+ my $bug = new Bugzilla::Bug($bug_id); >+ if (Bugzilla->params->{'usebugaliases'}) { >+ $item{alias} = type('string')->value($bug->alias); >+ } You don't need to include the bug's alias as part of get_activity, that makes no sense. You didn't set the types or handle any of the names from GetBugActivity. I'm going to attach a file that has code that does that (that I wrote for a contract). >+C<array> An array of hashes with each hash containing C<when>, which is a >+string that holds the date the bug activity/change happened, C<who> which is >+a string that holds the login name for the person who performed the change, >+and C<changes> which is an array of hashes that holds the change details. You need to describe the changes hash. This function also needs a "since" argument, but we can add that in another bug (since it requires parsing an input datetime).
Attachment #310734 -
Flags: review?(mkanat) → review-
Updated•16 years ago
|
Flags: approval?
Comment 5•16 years ago
|
||
This is the code necessary to fix up the returned changes to be an acceptable API.
Comment 6•16 years ago
|
||
Could you attach your last patch as a real one? It's a plain text file. No idea how to apply it (and where).
Comment 7•16 years ago
|
||
(In reply to comment #6) > Could you attach your last patch as a real one? It's a plain text file. No idea > how to apply it (and where). That's OK, Noura will know. If she doesn't, she can ask me.
Assignee | ||
Comment 8•16 years ago
|
||
> >+ if (Bugzilla->params->{'usebugaliases'}) {
> >+ $item{alias} = type('string')->value($bug->alias);
> >+ }
>
> You don't need to include the bug's alias as part of get_activity, that makes
> no sense.
I thought adding the bug alias is a good idea in case people will pass a mixture of bugs ids and aliases then they would know the activities they got was for which value they passed wether bug id or bug alias. what do you think?
Noura
Comment 9•16 years ago
|
||
(In reply to comment #8) > I thought adding the bug alias is a good idea in case people will pass a > mixture of bugs ids and aliases then they would know the activities they got > was for which value they passed wether bug id or bug alias. what do you think? Oh, yes, that makes sense! :-) Add a comment that explains that?
Assignee | ||
Comment 10•16 years ago
|
||
New patch with Max suggestions. Please review when you can. Thanks, Noura
Attachment #310734 -
Attachment is obsolete: true
Attachment #326168 -
Flags: review?(mkanat)
Attachment #326168 -
Flags: review?(LpSolit)
Comment 11•16 years ago
|
||
Comment on attachment 326168 [details] [diff] [review] v2 for WebService function Bug.get_activity() >Index: Bugzilla/WebService/Bug.pm >+ $item{history} = []; Instead I think we should return a hash, where bug ids point to the history. I think that would be a lot easier for callers. >+=item alias >+ >+C<string> The alias of this bug. If there is no alias or aliases are >+disabled in this Bugzilla, this will be an empty string. Actually, it should be undef, not an empty string. >+C<array> An array of hashes which contain the changes that happend to the bug Typo: happened I think attachment_id is missing from the docs on the return value. Otherwise this all looks pretty good!
Attachment #326168 -
Flags: review?(mkanat)
Attachment #326168 -
Flags: review?(LpSolit)
Attachment #326168 -
Flags: review-
Assignee | ||
Comment 12•16 years ago
|
||
Thanks for the review Max, here is another patch with the modifications. Noura
Attachment #326168 -
Attachment is obsolete: true
Attachment #326224 -
Flags: review?(mkanat)
Assignee | ||
Updated•16 years ago
|
Attachment #326224 -
Attachment is obsolete: true
Attachment #326224 -
Flags: review?(mkanat)
Assignee | ||
Comment 13•16 years ago
|
||
Please ignore previous patch. Noura
Attachment #326226 -
Flags: review?(mkanat)
Comment 14•16 years ago
|
||
Comment on attachment 326226 [details] [diff] [review] v3 for WebService Function Bug.get_activity This needs fixes to the POD related to bugid and attachment_id, which I will do on checkin. Otherwise it looks good! :-)
Attachment #326226 -
Flags: review?(mkanat) → review+
Comment 15•16 years ago
|
||
I fixed the POD, and I also renamed the method to get_history, since we're calling it "History" nowadays and I think that might be a clearer name for people using an API who don't know much about Bugzilla.
Attachment #326063 -
Attachment is obsolete: true
Attachment #326226 -
Attachment is obsolete: true
Attachment #326229 -
Flags: review+
Comment 16•16 years ago
|
||
Checking in Bugzilla/WebService/Bug.pm; /cvsroot/mozilla/webtools/bugzilla/Bugzilla/WebService/Bug.pm,v <-- Bug.pm new revision: 1.12; previous revision: 1.11 done
Status: ASSIGNED → RESOLVED
Closed: 16 years ago
Resolution: --- → FIXED
Updated•16 years ago
|
Flags: approval+
Updated•16 years ago
|
Target Milestone: Bugzilla 4.0 → Bugzilla 3.4
Updated•16 years ago
|
Flags: testcase?
Updated•15 years ago
|
Summary: Ability to get history of bug activity in the WebService → Ability to get history of bug activity in the WebService (Bug.history)
Comment 17•15 years ago
|
||
Added to the release notes for Bugzilla 3.4 in bug 494037.
Keywords: relnote
Comment 18•15 years ago
|
||
Actually, apparently I missed adding this one method to the release notes.
Keywords: relnote
Updated•13 years ago
|
Flags: testcase? → testcase+
You need to log in
before you can comment on or make changes to this bug.
Description
•