config.cgi?ctype=rdf should include keyword description

RESOLVED FIXED in Bugzilla 4.4

Status

()

--
enhancement
RESOLVED FIXED
7 years ago
6 years ago

People

(Reporter: Frank, Assigned: Frank)

Tracking

4.0.2
Bugzilla 4.4
Bug Flags:
approval +

Details

Attachments

(1 attachment, 1 obsolete attachment)

1.37 KB, patch
LpSolit
: review+
Details | Diff | Splinter Review
(Assignee)

Description

7 years ago
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

Updated

7 years ago
Severity: normal → enhancement
(Assignee)

Comment 1

6 years ago
Created attachment 615186 [details] [diff] [review]
patch V1
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 3

6 years ago
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-

Updated

6 years ago
Flags: approval?
(Assignee)

Comment 4

6 years ago
Created attachment 623773 [details] [diff] [review]
patch V2

changes requested by comment#3 are now included.
Attachment #615186 - Attachment is obsolete: true
Attachment #623773 - Flags: review?(LpSolit)

Comment 5

6 years ago
Comment on attachment 623773 [details] [diff] [review]
patch V2

Nice, thanks! r=LpSolit
Attachment #623773 - Flags: review?(LpSolit) → review+

Updated

6 years ago
Assignee: general → Frank
Status: UNCONFIRMED → ASSIGNED
Ever confirmed: true
Flags: approval+
Target Milestone: --- → Bugzilla 4.4

Comment 6

6 years ago
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
Last Resolved: 6 years ago
Resolution: --- → FIXED

Updated

6 years ago
Blocks: 802586
You need to log in before you can comment on or make changes to this bug.