Closed Bug 136603 Opened 22 years ago Closed 22 years ago

show_bug.cgi's XML retrieval needs a summary mode


(Bugzilla :: Creating/Changing Bugs, defect)

Not set



Bugzilla 2.18


(Reporter: bbaetz, Assigned: gerv)




(1 file)

bots don't want every comment, and if you don't want to change data via teh
xmlrpc stuff we don't support, you may want to use the shadowdb.

We should have either a mode which allows the user to select what fields they
want, and/or a nocomments mode for xml output. This would also be useful when we
start dumping attachment data.
Target Milestone: --- → Future
I can do this as part of the templatisation.

Depends on: 158499
Did you, Gerv?
No, because I haven't templatised XML output yet. I produced a patch, but people
were of the view that it wasn't the right approach.

I have half of such a patch - its mainly waiting on groups to go in, since it
changes much of the same code.
bbaetz: this would be pretty trivial now - a few tests on a boolean in the
template, and a bit in show_bug.cgi which turns a URL parameter into that
boolean. It wouldn't need and UI because it's for bots (we should probably
document it, though.) Are you up for this, or have you more important things to
do? :-)

I think we should just list the requested fields somehow, as comma separated, or
multiple params, or something.

Does that sound workable?
Well, we'd have to translate each individual parameter to a template variable in
the multiple parameters case. We could use a comma-separated list and create a
template variable of value "1" with the same name as each item in the list. That
would be less crufty.


I was thinging along the lines of


which gives a list within perl. I split up stuff for my just-checked-in xml
patch, because comma separation doesn't work if an alias contains a comma. (Plus
long_list was inconsistent)

Thats not an issue here, though, I guess, since fields can't contain commas.
The field stuff sounds great. However, how are we going to make "no parameters"
mean "everything"? Are all our tests going to have to be:

[% IF !fields OR fields.bug_status %]
[% END %]


Same way as from |fields| - we can set the var to the list of all fields if its
empty, from within the cgi.
The problem with that is that we then have to maintain a list of all the fields,
which sucks a bit. Given the choice, I'd rather have double-barrelled IF tests
than that...

We already have a list of all the fields - we sort of have to, if we want to
iterate through them

Check out
Attached patch Patch v.1Splinter Review
Here's version 1 - I think this is flexible enough for what we want.

Comment on attachment 110739 [details] [diff] [review]
Patch v.1

bbaetz: another one you have an interest in...

Attachment #110739 - Flags: review?(bbaetz)
Comment on attachment 110739 [details] [diff] [review]
Patch v.1

I'm happy with this. We aren't valid xml with this option, but short of making
the dtd a cgi (or having everything as optional), theres no way arround that.
Attachment #110739 - Flags: review?(bbaetz) → review+
-> patch author
Assignee: myk → gerv
OS: Linux → All
Hardware: PC → All
Target Milestone: Future → Bugzilla 2.18
Flags: approval?
Flags: approval? → approval+
Summary: xml.cgi needs a summary mode → show_bug.cgi's needs a summary mode
/me grumbles about the enter key being too close to the shift key
Summary: show_bug.cgi's needs a summary mode → show_bug.cgi's XML retreival needs a summary mode
Summary: show_bug.cgi's XML retreival needs a summary mode → show_bug.cgi's XML retrieval needs a summary mode

Checking in template/en/default/bug/show.xml.tmpl;
/cvsroot/mozilla/webtools/bugzilla/template/en/default/bug/show.xml.tmpl,v  <--
new revision: 1.2; previous revision: 1.1
Checking in show_bug.cgi;
/cvsroot/mozilla/webtools/bugzilla/show_bug.cgi,v  <--  show_bug.cgi
new revision: 1.22; previous revision: 1.21

Closed: 22 years ago
Resolution: --- → FIXED
QA Contact: matty_is_a_geek → default-qa
You need to log in before you can comment on or make changes to this bug.