Closed Bug 690873 Opened 13 years ago Closed 12 years ago

config.cgi?ctype=rdf should include keyword description

Categories

(Bugzilla :: Bugzilla-General, enhancement)

4.0.2
enhancement
Not set
normal

Tracking

()

RESOLVED FIXED
Bugzilla 4.4

People

(Reporter: Frank, Assigned: Frank)

References

Details

Attachments

(1 file, 1 obsolete file)

User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_7_1) AppleWebKit/534.48.3 (KHTML, like Gecko) Version/5.1 Safari/534.48.3

Steps to reproduce:

enter the url .../config.cgi?ctype=rdf


Actual results:

the config.cgi include the keyword names but not the description


Expected results:

We want the name and  the description of the keywords
Severity: normal → enhancement
Attached patch patch V1 (obsolete) — Splinter Review
Attachment #615186 - Flags: review?(mkanat)
Comment on attachment 615186 [details] [diff] [review]
patch V1

Seems sensible, although it's an API change so will only go into trunk.

Gerv
Attachment #615186 - Flags: review?(mkanat) → review+
Flags: approval?
Comment on attachment 615186 [details] [diff] [review]
patch V1

>=== modified file 'config.cgi'

>+$vars->{'keyword'}    = [map($_ , Bugzilla::Keyword->get_all)];

This code doesn't make sense. Why calling map() if you don't do anything with it anymore? It should simply be:

 $vars->{'keywords'} = [Bugzilla::Keyword->get_all];

Note that I also wrote $vars->{'keywords'} plural instead of $vars->{'keyword'} singular, for the reason I give below.



>=== modified file 'template/en/default/config.rdf.tmpl'

>   <bz:keyword>
>     <Seq>

You should rename bz:keyword to bz:keywords.

+      [% FOREACH keyword = keyword %]

You cannot write foo = foo, else you are going to get unexpected effects. You should write keyword = keywords, which is why I suggested the change above in config.cgi.


>+          <bz:keyword_def>

Instead of bz:keyword_def, you should write bz:keyword, for consistency with the other fields in this template (which is why I suggested to rename bz:keyword above, to not conflict with this one). Also, you should add a reference to it, e.g.
 rdf:about="[% escaped_urlbase %]keyword.cgi?name=[% keyword.name FILTER uri %]"

This is how we do it for all other fields.
Attachment #615186 - Flags: review-
Flags: approval?
Attached patch patch V2Splinter Review
changes requested by comment#3 are now included.
Attachment #615186 - Attachment is obsolete: true
Attachment #623773 - Flags: review?(LpSolit)
Comment on attachment 623773 [details] [diff] [review]
patch V2

Nice, thanks! r=LpSolit
Attachment #623773 - Flags: review?(LpSolit) → review+
Assignee: general → Frank
Status: UNCONFIRMED → ASSIGNED
Ever confirmed: true
Flags: approval+
Target Milestone: --- → Bugzilla 4.4
Committing to: bzr+ssh://lpsolit%40gmail.com@bzr.mozilla.org/bugzilla/trunk/
modified config.cgi
modified template/en/default/config.rdf.tmpl
Committed revision 8239.
Status: ASSIGNED → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Blocks: 802586
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: