Bug 186265 - add support for Bugzilla flags
Summary: add support for Bugzilla flags
Status: RESOLVED FIXED
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: Mylyn (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows XP
: P2 enhancement (vote)
Target Milestone: 3.1   Edit
Assignee: Frank Becker CLA
QA Contact:
URL:
Whiteboard:
Keywords: contributed, noteworthy
Depends on:
Blocks:
 
Reported: 2007-05-09 17:49 EDT by Robert Elves CLA
Modified: 2009-10-21 03:45 EDT (History)
10 users (show)

See Also:
robert.elves: review? (robert.elves)


Attachments
patch (8.87 KB, patch)
2008-05-09 15:47 EDT, Frank Becker CLA
no flags Details | Diff
patch (8.87 KB, patch)
2008-05-09 15:49 EDT, Frank Becker CLA
no flags Details | Diff
mylyn/context/zip (40.12 KB, application/octet-stream)
2008-05-09 15:51 EDT, Frank Becker CLA
no flags Details
updateted Patch (16.87 KB, patch)
2008-07-06 15:01 EDT, Frank Becker CLA
no flags Details | Diff
mylyn/context/zip (80.61 KB, application/octet-stream)
2008-07-06 15:01 EDT, Frank Becker CLA
no flags Details
patch (17.43 KB, patch)
2008-07-08 20:02 EDT, Frank Becker CLA
no flags Details | Diff
mylyn/context/zip (81.27 KB, application/octet-stream)
2008-07-08 20:02 EDT, Frank Becker CLA
no flags Details
complete patch (29.88 KB, patch)
2008-11-09 23:14 EST, Frank Becker CLA
no flags Details | Diff
mylyn/context/zip (69.48 KB, application/octet-stream)
2008-11-09 23:14 EST, Frank Becker CLA
no flags Details
update of complete patch (29.24 KB, patch)
2008-11-10 11:55 EST, Frank Becker CLA
no flags Details | Diff
mylyn/context/zip (69.76 KB, application/octet-stream)
2008-11-10 11:55 EST, Frank Becker CLA
no flags Details
patch for both flagtypes (66.67 KB, patch)
2008-11-28 10:33 EST, Frank Becker CLA
no flags Details | Diff
mylyn/context/zip (84.99 KB, application/octet-stream)
2008-11-28 10:33 EST, Frank Becker CLA
no flags Details
minor update (66.42 KB, patch)
2008-12-01 18:24 EST, Robert Elves CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Robert Elves CLA 2007-05-09 17:49:55 EDT
Although we may not be able to support this feature we need to ensure that submitting bugs with set flags does not drop the flags from the report.
Comment 1 Mik Kersten CLA 2007-05-10 15:21:12 EDT
I think these are now enabled on bugs.eclipse.org because I've seen them used for voting on LATER/REMIND states.
Comment 2 Robert Elves CLA 2007-05-11 19:34:03 EDT
Committing doesn't delete existing flags.
Comment 3 Krzysztof Daniel CLA 2007-11-22 04:31:39 EST
Is there any plan to add support for bugzilla review flag?
Comment 4 Robert Elves CLA 2007-11-22 12:30:21 EST
Unfortunately Bugzilla doesn't expose enough of the necessary information to implement this feature well within the task editor.   Next action should be to document the information we need and submit a bug report to bugzilla.org.
Comment 5 Robert Elves CLA 2008-04-25 19:43:19 EDT
Frank, low priority in terms of 3.0 but at some point if you have a moment, perhaps you could investigate this and throw up a summary of what is missing an recommended course of action.
Comment 6 Frank Becker CLA 2008-04-29 14:08:46 EDT
 (In reply to comment #5)
> Frank, low priority in terms of 3.0 but at some point if you have a moment,
> perhaps you could investigate this and throw up a summary of what is missing an
> recommended course of action.

Here what i figured out until now.
* Flags are only included in the /show_bug.cgi?id=nnn&ctype=xml if the status is set.
* /config.cgi?ctype=rdf did not include any information about defined flags.

Bug https://bugzilla.mozilla.org/show_bug.cgi?id=431363 created.

 
Comment 7 Robert Elves CLA 2008-04-30 11:57:39 EDT
Great, I've voted on https://bugzilla.mozilla.org/show_bug.cgi?id=431363, if others could that would help.
Comment 8 Frank Becker CLA 2008-05-09 15:47:39 EDT
Created attachment 99544 [details]
patch

This is only the first part.

Only the background changes are included.

For the UI I wait until the refectoring is done.
Comment 9 Frank Becker CLA 2008-05-09 15:49:57 EDT
Created attachment 99548 [details]
patch

This is only the first part.

Only the background changes are included.

For the UI I wait until the refectoring is done.
Comment 10 Frank Becker CLA 2008-05-09 15:51:00 EDT
Created attachment 99549 [details]
mylyn/context/zip
Comment 11 Robert Elves CLA 2008-05-12 13:50:48 EDT
Patch applied, ip log updated. Once I get the editor refactored we can work up the ui for this... great stuff.
Comment 12 Frank Becker CLA 2008-07-06 15:01:33 EDT
Created attachment 106667 [details]
updateted Patch

Here a Patch with a Editor for Flags.

Next Steps:

1) Add configuration support for Fflags per component
2) Add support for  flagtype requestable (specifically) multiplicable (extra flag addl. from html)
3) add support for not used flags (flags with state = "")

Please check if this patch is the right way to implement this.
Comment 13 Frank Becker CLA 2008-07-06 15:01:38 EDT
Created attachment 106668 [details]
mylyn/context/zip
Comment 14 Frank Becker CLA 2008-07-08 19:11:24 EDT
Hi Rob,

I have changed my Bugzilla 3.1.4+ installation to get the flag.id

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 %]"

Next I try to extend SaxMultiBugReportContentHandler in Mylyn
Comment 15 Frank Becker CLA 2008-07-08 20:02:35 EDT
Created attachment 106905 [details]
patch

With this patch and the bugzillafile change from comment 14 it is possible to use Mylyn for existing (state = '?','+','-') flags.

Comment12 is next to do.
Comment 16 Frank Becker CLA 2008-07-08 20:02:39 EDT
Created attachment 106906 [details]
mylyn/context/zip
Comment 17 Robert Elves CLA 2008-08-06 16:17:22 EDT
Frank, are the changes posted in comment#14 to be included in an upcoming release of Bugzilla server?
Comment 18 Kevin Benton CLA 2008-09-18 17:21:11 EDT
http://bonsai.mozilla.org/cvsview2.cgi?root=/cvsroot&subdir=mozilla/webtools/bugzilla/template/en/default/bug&files=show.xml.tmpl&command=DIRECTORY
http://bonsai.mozilla.org/cvsblame.cgi?file=mozilla/webtools/bugzilla/template/en/default/bug/show.xml.tmpl&rev=1.24&root=/cvsroot

Looks like it hasn't been done yet in the Bugzilla trunk.  You may want to update https://bugzilla.mozilla.org/show_bug.cgi?id=431363.  Unless something has changed I'm unaware of, voting at BMO does not increase a bug's priority at all, rather it just helps change the state from UNCONFIRMED to NEW.  Anyone with the proper access to that Bugzilla installation can update the bug from UNCONFIRMED to NEW.

If you really need something to get done to Bugzilla code, it's best to chat with developers on irc://irc.mozilla.org/#mozwebtools (after filing a bug, of course - which you've already done).  lpsolit and mkanat are the key people to talk with as they're "final say approvers" on code commits.  It's likely that if you sumit a simple patch to the bug above, after reopening the issue, then setting the review flag to ?, it'll likely slide through easily.

BTW - having flag support will make interacting with Bugzilla a lot easier for me as I use flags to track sprint work is done in.  Keywords aren't enough for me, because they don't help me understand when a decision was made not to include a feature in a sprint and it's also not possible to set permissions based on keywords.
Comment 19 Mik Kersten CLA 2008-10-01 23:49:25 EDT
Rob: Where is this at?  Can we get it into 3.1 with Frank's current patches?  Does the behavior fail gracefully?  Tentatively scheduling.
Comment 20 Kevin Benton CLA 2008-10-02 12:16:37 EDT
--- Comment 1
I see a number of lines of code commented out here, but there is no associated explanation why those new lines of code are commented out.  I suggest either removing the (especially new) commented out code, or at least explaining why the lines are commented out as a header to the comment block(s).

--- Comment 2
	if (state != null) {
		options.add("");
		options.add("?");
		options.add("+");
		options.add("-");
	}

The problem here is a flag may not be requestable ("?").  There are also times when a reader can see a flag but can't set it.  Each of these settings is configurable on a per-flag basis.

This is a lot better than nothing, but it deserves at least a TODO to detect what the real list of options should be per-flag.

--- Review Result
r-

--- Note:
While attempting to submit this comment to the patch (https://bugs.eclipse.org/bugs/attachment.cgi?id=106905), I was told I couldn't edit the patch.  It seems permissions in this installation could be set up a little better to allow comments on patches.  In open source, I'd rather allow anyone to do a review even if that review is invalid to encourage reviewers to participate (and provide mentoring) than to prevent reviews.
Comment 21 Frank Becker CLA 2008-11-08 08:32:40 EST
Sorry , I must create an new complete patch(one class was not included).
Comment 22 Frank Becker CLA 2008-11-09 23:14:24 EST
Created attachment 117410 [details]
complete patch

here is the complete patch.

Two things are left open (I need help here).
1) the size of the textfield of the requestee is to small
2) the order of the Flags is not the same as within HTML
Comment 23 Frank Becker CLA 2008-11-09 23:14:33 EST
Created attachment 117411 [details]
mylyn/context/zip
Comment 24 Frank Becker CLA 2008-11-10 11:55:17 EST
Created attachment 117457 [details]
update of complete patch

Sorry, I did not include support for not requestable flags
Comment 25 Frank Becker CLA 2008-11-10 11:55:23 EST
Created attachment 117458 [details]
mylyn/context/zip
Comment 26 Robert Elves CLA 2008-11-13 01:04:48 EST
Great Frank, it will take me a bit to review (plan to before the weekend).  In the mean time, could you build up some test coverage to exercise this new capability.  Just email me if you need anything specific done to the test repos.
Comment 27 Frank Becker CLA 2008-11-16 16:59:37 EST
(In reply to comment #14)
> Hi Rob,
> 
> I have changed my Bugzilla 3.1.4+ installation to get the flag.id
> 
> 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 %]"
> 
> Next I try to extend SaxMultiBugReportContentHandler in Mylyn
Sorry I did not report this as an request to the Bugzilla Team.
Now I create an Task for this (https://bugzilla.mozilla.org/show_bug.cgi?id=465219)
We have to wait until this is fixed.
Comment 28 Frank Becker CLA 2008-11-28 10:33:34 EST
Created attachment 119011 [details]
patch for both flagtypes

With the next Bugzilla Version (>3.2rc2) bug https://bugzilla.mozilla.org/show_bug.cgi?id=465219 is included so we can support flags.
Comment 29 Frank Becker CLA 2008-11-28 10:33:41 EST
Created attachment 119012 [details]
mylyn/context/zip
Comment 30 Frank Becker CLA 2008-11-30 08:19:11 EST
(In reply to comment #28)
> Created an attachment (id=119011)
> patch for both flagtypes
> 
> With the next Bugzilla Version (>3.2rc2) bug
> https://bugzilla.mozilla.org/show_bug.cgi?id=465219 is included so we can
> support flags.

Now that Bugzilla 3.2 is released we can update the testinstallation.
Comment 31 Robert Elves CLA 2008-12-01 13:38:02 EST
Perfect, I'll install and then start the review of your patch Frank. Great job coordinating this with the bugzilla.org crew!
Comment 32 Robert Elves CLA 2008-12-01 18:24:48 EST
Created attachment 119222 [details]
minor update

Just added some author tags etc. Looking great here Frank. Due to the size of the patch we'll need to submit for IP review.
Comment 33 Robert Elves CLA 2008-12-01 18:44:55 EST
Filed CQ 2866
Comment 34 Frank Becker CLA 2008-12-03 15:53:20 EST
(In reply to comment #33)
> Filed CQ 2866
> 

All changes in the patch submitted in comment#28 were authored by me and I have the right to contribute this code to Eclipse.
Comment 35 Robert Elves CLA 2008-12-12 16:59:39 EST
CQ has been approved. Patch applied, ip log updated (cq noted).   

Frank, you've done a tone of excellent work here. With the paper work out of the way we can get down to the nits!

* There appears to be a failure when submitting the blank flag option back to the repository (flag status for flag ID #1 is invalid). This may also be the source of the test failing in BugzillaRepository32Test?
* We may need to consider a custom part to display the flags together, perhaps then we could use the ids to help order the flag layout consistently?
Comment 36 Robert Elves CLA 2008-12-12 18:39:44 EST
Refinement of this feature to take place on bug#258712. Marking resolved.
Comment 37 Andrew Overholt CLA 2009-02-09 14:05:54 EST
Hi,

Any chance of this getting back-ported to the 3.0.x stream?  Is the patch relatively self-contained?  If so and if I did the work to merge it, would someone be able to look it over for me?

The reason I ask is because Red Hat bugzilla has flag support and the Fedora processes use them a lot.

Thanks,

Andrew
Comment 38 Robert Elves CLA 2009-02-10 17:29:33 EST
There are no plans to backport this (since it is more of a new feature than a bug fix, at least from Mylyn perspective).  Additionally, we're still working out the rough edges (tune into bug#258712 for lastest activity).  
Comment 39 Steffen Pingel CLA 2009-02-10 17:37:24 EST
The 3.1 release with flag support will become available on March 4th, two weeks after 3.0.5 will go out.
Comment 40 Andrew Overholt CLA 2009-02-11 14:11:08 EST
(In reply to comment #39)
> The 3.1 release with flag support will become available on March 4th, two weeks
> after 3.0.5 will go out.

Oh, I didn't realize there'd be a 3.1 release.  I was assuming 3.0.5 would be the last Ganymede Mylyn release.  I'll package up a recent 3.1 build and ask some Fedora people to give it a shot to verify it fixes the issues they've been seeing.  Thanks.
Comment 41 Steffen Pingel CLA 2009-02-11 15:42:07 EST
The 3.1 release will not be part of the release train but it will be backwards compatible with 3.3: http://www.eclipse.org/projects/project-plan.php?projectid=tools.mylyn

It is likely that this will also apply to the 3.2 release which will be released for Galileo and support Eclipse 3.5, 3.4 and 3.3.
Comment 42 Eike Stepper CLA 2009-10-21 03:33:51 EDT
Thank you for supporting the flags now in the editor, we're using them a lot ;-)

Is there a way to use them in queries? We'd like to specify a "review-queue" query with the "review?" flag.

Unfortunately this URL based query does not work (it times out):

https://bugs.eclipse.org/bugs/buglist.cgi?field0-0-0=flagtypes.name;classification=Modeling;query_format=advanced;bug_status=UNCONFIRMED;bug_status=NEW;bug_status=ASSIGNED;bug_status=REOPENED;version=3.0;type0-0-0=equals;value0-0-0=review%3F;component=CDO;component=Net4j;product=EMF
Comment 43 Eike Stepper CLA 2009-10-21 03:45:27 EDT
Oh, I found out what might have happened: The new bugzilla seems to use ";" to separate fields, instead of "&". 

After converting the semicolons to ampersands my Mylyn query is working again ;-)