Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 335278

Summary: enhance search result handler to handle additional attributes
Product: z_Archived Reporter: David Green <greensopinion>
Component: MylynAssignee: David Green <greensopinion>
Status: RESOLVED FIXED QA Contact: Frank Becker <eclipse>
Severity: enhancement    
Priority: P3 CC: eclipse, robert.elves
Version: unspecified   
Target Milestone: 3.5   
Hardware: PC   
OS: Windows 7   
Whiteboard:
Attachments:
Description Flags
patch that adds support for additional columns
eclipse: iplog+
mylyn/context/zip
none
a patch with unit test
eclipse: iplog+
mylyn/context/zip none

Description David Green CLA 2011-01-25 02:43:28 EST
When using the @BugzillaClient@  it's possible to add columns to the search results by passing the desired columns in the columnlist parameter.  Some of these are correctly mapped to BugzillaAttribute, however others are not.  @SaxBugzillaQueryContentHandler@ should be modified to handle the following mappings:

reporter_realname
assigned_to_realname
Comment 1 David Green CLA 2011-01-25 02:44:22 EST
Created attachment 187496 [details]
patch that adds support for additional columns
Comment 2 Steffen Pingel CLA 2011-01-25 13:56:11 EST
That sounds reasonable to me but I think the implementation of the patch could be improved. Are the additional tags standards Bugzilla tags? Why not add them to BugzillaAttribute?
Comment 3 Frank Becker CLA 2011-01-25 14:44:56 EST
(In reply to comment #2)
> That sounds reasonable to me but I think the implementation of the patch could
> be improved. Are the additional tags standards Bugzilla tags? Why not add them
> to BugzillaAttribute?

Yes we should support all possible columns.

Should we open an other bug for extend the BugzillaSearchPage to allow the selection of the columns.
We can pass them columnlist= field in the queryurl?
Comment 4 Steffen Pingel CLA 2011-01-25 19:26:59 EST
> Should we open an other bug for extend the BugzillaSearchPage to allow the
> selection of the columns.
> We can pass them columnlist= field in the queryurl?

Do you have ideas how to present that in the search result view? I am not sure that we would want to add columns there as it would potentially make the view more difficult to use, e.g. when searching with different connectors.
Comment 5 David Green CLA 2011-01-26 18:20:30 EST
(In reply to comment #2)
> That sounds reasonable to me but I think the implementation of the patch could
> be improved. Are the additional tags standards Bugzilla tags? Why not add them
> to BugzillaAttribute?

The additional attributes are standard Bugzilla ones, however their name in BugzillaAttribute doesn't correspond to the name of the XML element returned in the search result, which is why they are handled specially.  I assumed that changing the attribute name in BugzillaAttribute was a non-starter.
Comment 6 Frank Becker CLA 2011-01-27 16:38:03 EST
I think that I found two other columns that need special cases:

Bugzzilla UI	-> BugzillaAttribute
opendate -> creation_ts
changeddate -> delta_ts

Can someone verify!
Comment 7 Frank Becker CLA 2011-01-27 16:38:05 EST
Created attachment 187782 [details]
mylyn/context/zip
Comment 8 Frank Becker CLA 2011-01-30 13:44:51 EST
(In reply to comment #4)
> > Should we open an other bug for extend the BugzillaSearchPage to allow the
> > selection of the columns.
> > We can pass them columnlist= field in the queryurl?
> 
> Do you have ideas how to present that in the search result view? I am not sure
> that we would want to add columns there as it would potentially make the view
> more difficult to use, e.g. when searching with different connectors.

I think we should use TaskListToolTip to show the additional information. The Query is used to build the Tasklist to, so this a one place for both cases.

Thoughts?
Comment 9 Steffen Pingel CLA 2011-01-30 21:49:02 EST
> I think we should use TaskListToolTip to show the additional information. The
> Query is used to build the Tasklist to, so this a one place for both cases.

That way users would be able to configure additional fields to be displayed in the tooltip? It's an interesting idea but I wonder if the query UI will get even more complex.
Comment 10 Frank Becker CLA 2011-01-31 15:41:10 EST
(In reply to comment #9)
> > I think we should use TaskListToolTip to show the additional information. The
> > Query is used to build the Tasklist to, so this a one place for both cases.
> 
> That way users would be able to configure additional fields to be displayed in
> the tooltip? It's an interesting idea but I wonder if the query UI will get
> even more complex.

Yes but if we fix bug# 332304 we can build a new UI with TabFolder instead of ExpandableComposite
with the following tabs:
* Detail summery of all selected fields including column information
* Basic
* More
* Charts
* ResultColumns

Thoughts?
Comment 11 David Green CLA 2011-02-01 13:16:09 EST
This bug was originally intended to improve the BuzillaClient class, for use in Java programs.   Is it possible to work with this patch to improve it, get it integrated and then the UI discussion can continue?

(In reply to comment #6)
> I think that I found two other columns that need special cases:
> 
> Bugzzilla UI	-> BugzillaAttribute
> opendate -> creation_ts
> changeddate -> delta_ts

The date columns are fomatted to omit the time portion, so they're not equivalent.  Not sure about the other one.
Comment 12 Steffen Pingel CLA 2011-02-01 13:23:14 EST
Can you add a test case to the patch David?
Comment 13 Frank Becker CLA 2011-02-10 15:47:08 EST
Thanks David, I commit your  patch.

What is about an test case?
Comment 14 David Green CLA 2011-02-15 16:50:55 EST
I still owe you a test case.
Comment 15 David Green CLA 2011-02-23 16:25:37 EST
Created attachment 189643 [details]
a patch with unit test
Comment 16 David Green CLA 2011-02-23 16:25:40 EST
Created attachment 189644 [details]
mylyn/context/zip
Comment 17 Frank Becker CLA 2011-02-23 17:06:10 EST
Should we leave this bug open for address the UI changes or do you think we better open an new bug?
Comment 18 Steffen Pingel CLA 2011-02-23 17:22:52 EST
(In reply to comment #17)
> Should we leave this bug open for address the UI changes or do you think we
> better open an new bug?

Let's resolve this and open a new bug to capture the discussion about proposed UI changes.
Comment 19 Steffen Pingel CLA 2011-02-23 18:43:25 EST
Patches have been applied.