Closed Bug 431363 Opened 16 years ago Closed 16 years ago

Include information about flag types when config.cgi returns data in the RDF format

Categories

(Bugzilla :: Bugzilla-General, enhancement)

3.1.3
enhancement
Not set
normal

Tracking

()

RESOLVED FIXED
Bugzilla 3.2

People

(Reporter: Frank, Assigned: LpSolit)

References

(Blocks 1 open bug)

Details

Attachments

(1 file, 1 obsolete file)

User-Agent:       Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_5_2; de-de) AppleWebKit/525.18 (KHTML, like Gecko) Version/3.1.1 Safari/525.18
Build Identifier: Bugzilla 3.1.3+

For Mylyn we want support the Flags in the Rich Client Editor.
(see https://bugs.eclipse.org/bugs/show_bug.cgi?id=186265)

What we need are all the UI relevant attributes 
- Edit Name
- Description
- Properties
and maybethe Sortkey

Mylyn use thectype=rdf 

Reproducible: Always
Should be trivial to do. To not disclose unwanted information, only *active* flags belonging to products you *can see* should be listed. Which properties do you need exactly?
Status: UNCONFIRMED → NEW
Ever confirmed: true
OS: Mac OS X → All
Hardware: Macintosh → All
Target Milestone: --- → Bugzilla 3.2
Version: unspecified → 3.1.3
(In reply to comment #1)
> Should be trivial to do. To not disclose unwanted information, only *active*
> flags belonging to products you *can see* should be listed. Which properties do
> you need exactly?
> 

It is OK to only include active flags.

I think we need the following information.
1) Kind (Bug or Attachment)
2) name of the flag (editflagtypes.cgi column named "Edit Name ...")
3) type information (editflagtypes.cgi column named "Properties")
    minimum requestable (specifically) and requestable  needed to build the right combo content
4) Description (editflagtypes.cgi column named "Description") for tooltip support

Maybe
5) Sortkey

I suppose you also want to know for which products/components a flag type applies? Everything else it trivial to do. This part is the annoying one.
(In reply to comment #3)
> I suppose you also want to know for which products/components a flag type
> applies? Everything else it trivial to do. This part is the annoying one.
> 

Yes sorry that I did not include this :-(
+1 Mylyn users would definitely benefit from this.
OK, I will do it, but I will need help from Mylyn guys because I don't really know how the RDF syntax is supposed to work. So I will start with my first question:

If two components in two different products have the same name, they are both referenced as (e.g. if the component name is "TestComponent"):

  <li resource="http://localhost/bugzilla/component.cgi?name=TestComponent"/>

and later in the RDF file we have:

  <bz:component rdf:about="http://localhost/bugzilla/component.cgi?name=TestComponent">
    <bz:name>TestComponent</bz:name>
  </bz:component>

So how do you distinguish which product's component we are talking about?

My idea was to add flag properties here, but they are different for two different products so I need to distinguish components having the same name. Is it legal and enough to append &product=Foo (where Foo will be replaced by the real name of the product) to the URI so that we can know which component belongs to which product?
Assignee: general → LpSolit
Attached patch patch, v1 (obsolete) — Splinter Review
I only alter the RDF template. I'm not sure we should and need to do it for the JS template too. Myk, are you fine if we break the parity between the JS and RDF templates?

Mylyn guys, tell me if this patch suits your needs (apply it to your Bugzilla installation as you are running 3.0.1). I didn't include the sortkey because the list of flags is already sorted based on it, so you already know in which order to display them.
Attachment #319161 - Flags: review?(myk)
Attachment #319161 - Flags: review?(mkanat)
(In reply to comment #7)
> Created an attachment (id=319161) [details]
> patch, v1
> 
> Mylyn guys, tell me if this patch suits your needs (apply it to your Bugzilla
> installation as you are running 3.0.1). I didn't include the sortkey because
> the list of flags is already sorted based on it, so you already know in which
> order to display them.
> 
I only look at the rdf file. But I think that I can change the rdf paser to extract the needed information.

Maybe it is better to include only the flagname in the component and define the <bz:flag_types> details outside of the component. Then you only need the flagname as a reference. That can save space, if the same flag is in more the on component.

Btw. I hope that I can try to implement this in the next days.

Hey this is great guys! Frank, I've merged this patch into our /bugs30 so you have something to test against.
(In reply to comment #8)
> Maybe it is better to include only the flagname in the component and define the
> <bz:flag_types> details outside of the component. Then you only need the
> flagname as a reference. That can save space, if the same flag is in more the
> on component.

Good idea, I will do that. :)
Status: NEW → ASSIGNED
Attached patch patch, v2Splinter Review
Implement Frank's suggestion.
Attachment #319161 - Attachment is obsolete: true
Attachment #319292 - Flags: review?(myk)
Attachment #319292 - Flags: review?(mkanat)
Attachment #319161 - Flags: review?(myk)
Attachment #319161 - Flags: review?(mkanat)
  I don't want to break parity between RDF and JS, even though RDF is way more used, I think. If we don't want to maintain the JS template, it should be removed. Otherwise it should be maintained.
(In reply to comment #12)
>   I don't want to break parity between RDF and JS, even though RDF is way more
> used, I think. If we don't want to maintain the JS template, it should be
> removed. Otherwise it should be maintained.

I see no good way to do it in JS because you cannot use references, and we have a real use case about the RDF version while I never heard anything about the JS one. The templates themselves say that:

<!-- Note: this interface is experimental and under development.
   - We may and probably will make breaking changes to it in the future. -->

This may include parity. But I don't want to waste energy on the JS template.
Comment on attachment 319292 [details] [diff] [review]
patch, v2

I didn't do a thorough review, but I took a look at this, and it seems fine.
Attachment #319292 - Flags: review?(myk) → review+
Comment on attachment 319292 [details] [diff] [review]
patch, v2

  Yeah, looks good. It'd be nice to have JS parity, but I suppose nobody's asked for it.
Attachment #319292 - Flags: review?(mkanat) → review+
Flags: approval+
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; previous revision: 1.12
done
Status: ASSIGNED → RESOLVED
Closed: 16 years ago
Resolution: --- → FIXED
Summary: please include the flag information in config.cgi → Include information about flag types when config.cgi returns data in the RDF format
Excellent!  

Rob, Frank: please provide feedback once you've had a chance to incorporate this.
Blocks: bz-clients
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: