Closed Bug 465219 Opened 16 years ago Closed 16 years ago

include ID in the flag section of /show_bug.cgi?id=...&ctype=xml

Categories

(Bugzilla :: Creating/Changing Bugs, enhancement)

enhancement
Not set
normal

Tracking

()

RESOLVED FIXED
Bugzilla 3.2

People

(Reporter: Frank, Assigned: Frank)

References

(Blocks 1 open bug)

Details

Attachments

(1 file, 4 obsolete files)

User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_5_5; de-de) AppleWebKit/525.26.2 (KHTML, like Gecko) Version/3.2 Safari/525.26.12 Build Identifier: 3.2rc2 Please include the FlagID of the flag in the output of type xml Reproducible: Always Steps to Reproduce: Please change two times in file /template/en/default/bug/show.xml.tmpl (line 58/59 and 101/102) <flag name="[% type.name FILTER xml %]" status="[% flag.status FILTER xml %]" to <flag name="[% type.name FILTER xml %]" id="[% flag.id FILTER xml %]" status="[% flag.status FILTER xml %]" This is needed for Mylyn to support flags in the UI.
Attached patch patch (obsolete) — Splinter Review
Is there some other API that we could provide you for dealing with flags, instead, that would be easier to deal with?
(In reply to comment #2) > Is there some other API that we could provide you for dealing with flags, > instead, that would be easier to deal with? Actually Mylyn use '/show_bug.cgi?ctype=xml&excludefield=attachmentdata&id=' for getting the taskinformation and 'process_bug.cgi' to change/update the taskinformation. So we need the ID of an flag for building the name/value pairs. I think that we should look if we can switch to the Webservice API in the future.
Yes, for now our Bugzilla client relies strictly on the config rdf and the xml from individual bugs to establish what can/cannot happen and what to post back to update a bug. If at all possible, gathering what flags are available and their parameters from the configuration directly would be ideal, then if the necessary bits were included in the bug xml to affect changes this would help a great deal. So Max, these changes are along the lines of what you observed on bug#37681 comment#9 but for flags. Of course having similar functionality via the ws api would be great, but we currently aren't on that path, although we would like to be as soon as possible and could help as a driver to round out service. Blocks -> 449137
Correction, bug reference in last comment should read bug#378681 comment#9.
Blocks: bz-clients
Okay, I think it's reasonable to include the ids, then. Would an attribute or a tag be best for you?
Status: UNCONFIRMED → NEW
Ever confirmed: true
(In reply to comment #6) > Okay, I think it's reasonable to include the ids, then. Would an attribute or a > tag be best for you? Actually I have an patch for Mylyn(https://bugs.eclipse.org/bugs/show_bug.cgi?id=186265) which use the changes from attachment (id=348529) but if you want to implement this as a tag I can change this.
Attached patch patch of config.rdf.tmpl (obsolete) — Splinter Review
Please also include the flag ID in config.rdf.tmpl. This make the work for Mylyn much easier.
Attachment #349639 - Attachment is patch: true
Attached patch complete new patch (obsolete) — Splinter Review
I found one more thing that I had to change to get this work with Mylyn. Change flags.cgi to flag.cgi in file config.rdf.tmpl. <li resource="[% urlbase FILTER xml %]flags.cgi?id=[% flag_type.id FILTER url_quote was changed to <li resource="[% urlbase FILTER xml %]flag.cgi?id=[% flag_type.id FILTER url_quote
Attachment #348529 - Attachment is obsolete: true
Attachment #349639 - Attachment is obsolete: true
(In reply to comment #9) > Change flags.cgi to flag.cgi in file config.rdf.tmpl. Why do you need this change? This may break other applications relying on this. Also, please request review to put your patch in our radar.
Frank, see our development process here: http://wiki.mozilla.org/Bugzilla:Developers That will help you get your patch accepted.
Assignee: create-and-change → Frank
(In reply to comment #10) > (In reply to comment #9) > > Change flags.cgi to flag.cgi in file config.rdf.tmpl. > > Why do you need this change? This may break other applications relying on this. I think that the uri used as a resource should be the same as the about uri of the definition. Example: <li resource="http://macmainz.dyndns.org/Internet/Bugzilla_Develop/component.cgi?name=Bugzilla&amp;product=MylynTest"/> and <bz:component rdf:about="http://macmainz.dyndns.org/Internet/Bugzilla_Develop/component.cgi?name=Bugzilla&amp;product=MylynTest"> but not <li resource="http://macmainz.dyndns.org/Internet/Bugzilla_Develop/flags.cgi?id=1&amp;name=FLAG_A" /> and <bz:flag_type rdf:about="http://macmainz.dyndns.org/Internet/Bugzilla_Develop/flag.cgi?id=1&amp;name=FLAG_A"> > > Also, please request review to put your patch in our radar. OK I now use the Flags and look at the url from comment#11
Attached patch patch, V1 (obsolete) — Splinter Review
1) In show.xml.tmpl the ID of an flag was included.(see comment#3 and comment#7) 2) In config.rdf.tmpl I also add the Flag ID and fix a problem with non matching URI used in "resource=" and "about=" (see comment#8, comment#9 and comment#12) (In reply to comment #11) > Frank, see our development process here: > > http://wiki.mozilla.org/Bugzilla:Developers > > That will help you get your patch accepted. Hope that this is what you expect.
Attachment #349669 - Attachment is obsolete: true
Attachment #349804 - Flags: review?(mkanat)
Comment on attachment 349804 [details] [diff] [review] patch, V1 >Index: template/en/default/config.rdf.tmpl >- <li resource="[% urlbase FILTER xml %]flags.cgi?id=[% flag_type.id FILTER url_quote >+ <li resource="[% urlbase FILTER xml %]flag.cgi?id=[% flag_type.id FILTER url_quote This is an API break that we can't do on a stable branch. Everything else looks fine.
Attachment #349804 - Flags: review?(mkanat) → review-
I assume that you want this as part of 3.2.
Status: NEW → ASSIGNED
Target Milestone: --- → Bugzilla 3.2
Attached patch patch, V2Splinter Review
The api break from comment#14 is no longer included. We build an workaround in Mylyn to get around this. (In reply to comment #15) > I assume that you want this as part of 3.2. Yes, it is great if this is possible.
Attachment #349804 - Attachment is obsolete: true
Attachment #349941 - Flags: review?(mkanat)
Comment on attachment 349941 [details] [diff] [review] patch, V2 Looks fine to me. Of course, you know that you're putting a type ID in the config.rdf and a flag ID in the show.xml, right? (Unrelated ids.)
Attachment #349941 - Flags: review?(mkanat) → review+
Flags: approval3.2+
Flags: approval+
(In reply to comment #17) > (From update of attachment 349941 [details] [diff] [review]) > Looks fine to me. Of course, you know that you're putting a type ID in the > config.rdf and a flag ID in the show.xml, right? (Unrelated ids.) Yes but I need both. The ID from show.xml is used for submit changes of existing flags and the ID from the config.rdf is used for setting new flags.
tip: Checking in template/en/default/config.rdf.tmpl; /cvsroot/mozilla/webtools/bugzilla/template/en/default/config.rdf.tmpl,v <-- config.rdf.tmpl new revision: 1.15; previous revision: 1.14 done Checking in template/en/default/bug/show.xml.tmpl; /cvsroot/mozilla/webtools/bugzilla/template/en/default/bug/show.xml.tmpl,v <-- show.xml.tmpl new revision: 1.25; previous revision: 1.24 done 3.2: Checking in template/en/default/config.rdf.tmpl; /cvsroot/mozilla/webtools/bugzilla/template/en/default/config.rdf.tmpl,v <-- config.rdf.tmpl new revision: 1.13.2.1; previous revision: 1.13 done Checking in template/en/default/bug/show.xml.tmpl; /cvsroot/mozilla/webtools/bugzilla/template/en/default/bug/show.xml.tmpl,v <-- show.xml.tmpl new revision: 1.23.2.2; previous revision: 1.23.2.1 done
Status: ASSIGNED → RESOLVED
Closed: 16 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: