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

Bug 153539

Summary: Trac connector: Implement generialized issue search
Product: z_Archived Reporter: Steffen Pingel <steffen.pingel>
Component: MylynAssignee: Steffen Pingel <steffen.pingel>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P1    
Version: unspecified   
Target Milestone: ---   
Hardware: Other   
OS: Linux   
Whiteboard:
Bug Depends on: 142783    
Bug Blocks:    
Attachments:
Description Flags
Generic search for Trac
none
create Trac tasks on demand
none
mylar/context/zip none

Description Steffen Pingel CLA 2006-08-11 04:25:48 EDT
Adapt query page to refactored query framework (bug 142783).
Comment 1 Steffen Pingel CLA 2006-08-12 10:40:22 EDT
Created attachment 47810 [details]
Generic search for Trac

If the last search was done in a Trac repository and the search dialog is reopened the Search button is disabled although scontainer.setPerformActionEnabled(true) is invoked in setVisible().
Comment 2 Robert Elves CLA 2006-08-12 12:56:41 EDT
Applied patch and fixed above issue (scontainer.setPerformActionEnabled(true) was being overridden by RepositorySearchPage, my bad). Looking into changes you suggested on bug#142783 comment#11.
Comment 3 Mik Kersten CLA 2006-08-21 19:01:02 EDT
Great to see the integrated Trac search working!

There is an oustanding problem here: invoking the search for a common term (e.g. "ticket") causes non-stop flickering of the Task List, indicating a bug with notifiying the task list of changes during the search.  Please investigate.
Comment 4 Steffen Pingel CLA 2006-08-21 19:56:21 EDT
The implementation currently invokes TracRepositoryConnector.performQuery() which creates a task for each query hit. It does not invoke notifyLocalInfoChanged() though so I am not sure where the flickering comes from (it does not happen on my system). 

The current implemenation will cause all query hits to show up in the archive category which is probably undesired anyways? I'll change TracQueryHit to create tasks on demand like BugzillaQueryHit does which should fix this.
Comment 5 Mik Kersten CLA 2006-08-22 15:38:04 EDT
Yes, that should fix it and is the correct behavior.  For example, I recently noticed a test tasklist.xml bloat to from 100 to 600K when I accidentally made too comprehensive a query.  We should also consider the Framework encapsulating the on-demand creation of tasks.

Could you please submit a patch for the failing Trac tests?
Comment 6 Steffen Pingel CLA 2006-08-22 16:42:40 EDT
(In reply to comment #5)
> Could you please submit a patch for the failing Trac tests?

I commited the fix as part of the attachment handler:
https://bugs.eclipse.org/bugs/show_bug.cgi?id=151900#c10 .

Yes, there is a potential for a more generic implementation of the query result handling. I got started on that yesterday but I got stuck refactoring DelegatingTaskExternalizer which currently doesn't handle query results. I would like to move the implementation of BugzillaTaskExternalizer.readQueryHit() and readQueryHit() up to the abstract super class to avoid duplicating that code for Trac. Does that make sense?
Comment 7 Steffen Pingel CLA 2006-08-23 23:27:02 EDT
Created attachment 48552 [details]
create Trac tasks on demand
Comment 8 Steffen Pingel CLA 2006-08-23 23:27:04 EDT
Created attachment 48553 [details]
mylar/context/zip
Comment 9 Mik Kersten CLA 2006-08-24 00:15:52 EDT
Patch applied.  Please mark resolved if this completes the task.
Comment 10 Steffen Pingel CLA 2006-08-24 10:54:05 EDT
Fixed.