Bug 339470

Summary: move flags to subsection
Product: z_Archived Reporter: Steffen Pingel <steffen.pingel>
Component: MylynAssignee: Frank Becker <eclipse>
Status: RESOLVED FIXED QA Contact: Frank Becker <eclipse>
Severity: enhancement    
Priority: P3 CC: mik.kersten, robert.elves, shawn.minto
Version: unspecifiedKeywords: noteworthy
Target Milestone: 3.6   
Hardware: PC   
OS: Linux   
Whiteboard:
Attachments:
Description Flags
patch V1
eclipse: review?
mylyn/context/zip
none
mylyn/context/zip
none
mylyn/context/zip
none
patch V4
none
mylyn/context/zip
none
screenshot none

Description Steffen Pingel CLA 2011-03-10 02:34:38 EST
Some repositories define many flags which can make the attributes section very long. It's also not easy to determine which flags are actually set. To improve I suggest that flags are moved to a sub-section of Attributes named "Flags" that is collapsed by default.

The section client are should show all configured flags similar to how the product / component is shown in the title of th eAttributes section.
Comment 1 Steffen Pingel CLA 2011-03-10 02:35:09 EST
Let's do this for 3.6, should be straight forward.
Comment 2 Frank Becker CLA 2011-03-13 15:52:09 EDT
Created attachment 191078 [details]
patch V1

Here is what I commit to HEAD.

The infoOverlayText on the right has a Tooltip with Details.

Steffen,

please review!
Comment 3 Frank Becker CLA 2011-03-13 15:52:12 EDT
Created attachment 191079 [details]
mylyn/context/zip
Comment 4 Steffen Pingel CLA 2011-03-13 19:04:57 EDT
It doesn't seem to work for me. I get a section with a label that says "0 unused flags" but flags still show under attributes. It shouldn't show if there are no attributes and I would expect that we need to migrate task data?
Comment 5 Frank Becker CLA 2011-03-14 00:53:32 EDT
(In reply to comment #4)
> It doesn't seem to work for me. I get a section with a label that says "0 unused
> flags" but flags still show under attributes. It shouldn't show if there are no
> attributes and I would expect that we need to migrate task data?

Yes we have to migrate the TaskData!

I change the BugzillaFagMapper to no longer use TaskAttribute.KIND_DEFAULT (which is shown under Attributes) now BugzillaAttribute.KIND_FLAG is used.

Hope that I can do a fix for this today.
Comment 6 Frank Becker CLA 2011-03-14 15:32:16 EDT
Fix is now in HEAD, please test.

Sorry that I not include the migrate in my first patch.
Comment 7 Frank Becker CLA 2011-03-14 15:32:48 EDT
Created attachment 191161 [details]
mylyn/context/zip
Comment 8 Steffen Pingel CLA 2011-03-14 17:14:20 EDT
Thanks. It seems to work now for bugs.eclipse.org. I still get an empty section though for bugs that do not have flags (e.g. https://dev.eclipse.org/ipzilla/show_bug.cgi?id=4397). The CQ bugs are kind of odd anyways since I do see flags in the web interface but it's an older Bugzilla (3.0.1).
Comment 9 Steffen Pingel CLA 2011-03-14 17:39:03 EDT
Some suggestion for the label:
* Left align it with the section header (use two "  " spaces to separate it)
* Change the format to: 7 Flags (2 set)
Comment 10 Frank Becker CLA 2011-03-15 17:49:23 EDT
I commit the changes requested in comment #8 and comment #9.

* BugzillaFlagMapper.applyTo only set the kind for Bugzilla >= 3.2 so I had to change the migrate to.
* If no Flags exist in the TaskData we do not include the BugzillaFlagPart in the Editor.
* To add Actions to the ExpandableComposite define fillToolBar in BugzillaFlagPart.
Comment 11 Frank Becker CLA 2011-03-15 17:49:26 EDT
Created attachment 191256 [details]
mylyn/context/zip
Comment 12 Steffen Pingel CLA 2011-04-14 11:29:06 EDT
This looks great. Only minor nit that I have left, is that we should remove the text in parenthesis "(0 set)" if there are no flags set.
Comment 13 Frank Becker CLA 2011-04-18 14:57:43 EDT
Created attachment 193519 [details]
patch V4

committed patch
Comment 14 Frank Becker CLA 2011-04-18 14:57:45 EDT
Created attachment 193520 [details]
mylyn/context/zip
Comment 15 Frank Becker CLA 2011-04-18 14:59:34 EDT
Think we are done here!
Comment 16 Steffen Pingel CLA 2011-05-15 15:47:43 EDT
Created attachment 195675 [details]
screenshot