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

Bug 106990

Summary: [connector] CollabNet IssueZilla/IssueTracker
Product: z_Archived Reporter: Eugene Kuleshov <ekuleshov>
Component: MylynAssignee: Mylyn Inbox <mylyn-inbox>
Status: RESOLVED NOT_ECLIPSE QA Contact:
Severity: enhancement    
Priority: P4 CC: mik.kersten, pombredanne, robert.elves, tfmorris, wes.coelho
Version: 0.3Keywords: helpwanted
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Whiteboard:
Attachments:
Description Flags
CollabNet support
none
CollabNet support
none
collabnet -sandbox
none
collabnet-sandbox
none
support CollabNet
none
collab support
none
CollabNET support none

Description Eugene Kuleshov CLA 2005-08-14 23:52:42 EDT
Mular 0.3.4 can't query bugzilla integrated into CollabNet groupware used on
sites like tigris.org, java.net, dev2dev.bea.com. E.g. http://subclipse.tigris.org/issues/


Query screen has all list boxes empty after update.
Comment 1 Mik Kersten CLA 2005-08-15 14:32:16 EDT
Eugene: in the Bugzilla preferneces try to set the version to 2.16 since they
may be using that.

Shawn: if that doesn't resolve it let's make sure to look into it this week.
Comment 2 Eugene Kuleshov CLA 2005-08-15 15:27:13 EDT
(In reply to comment #1)
> Eugene: in the Bugzilla preferneces try to set the version to 2.16 since they
> may be using that.
> 
> Shawn: if that doesn't resolve it let's make sure to look into it this week.

Doesn't work with 2.16 either. Query fields are still empty.

Errors in the log:

Failed to execute runnable (java.lang.IllegalArgumentException: )
org.eclipse.swt.SWTException: Failed to execute runnable
(java.lang.IllegalArgumentException: )
	at org.eclipse.swt.SWT.error(SWT.java:2942)
	at org.eclipse.swt.SWT.error(SWT.java:2865)
	at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:126)
	at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:3057)
	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:2716)
	at
org.eclipse.jface.operation.ModalContext$ModalContextThread.block(ModalContext.java:153)
	at org.eclipse.jface.operation.ModalContext.run(ModalContext.java:303)
	at
org.eclipse.jface.dialogs.ProgressMonitorDialog.run(ProgressMonitorDialog.java:447)
	at
org.eclipse.ui.internal.progress.ProgressMonitorJobsDialog.run(ProgressMonitorJobsDialog.java:261)
	at org.eclipse.ui.internal.progress.ProgressManager.run(ProgressManager.java:1066)
	at
org.eclipse.mylar.bugzilla.ui.actions.RefreshBugzillaReportsAction.runWithProgressBar(RefreshBugzillaReportsAction.java:129)
	at
org.eclipse.mylar.bugzilla.ui.actions.RefreshBugzillaReportsAction.run(RefreshBugzillaReportsAction.java:69)
	at
org.eclipse.mylar.bugzilla.ui.actions.RefreshBugzillaReportsAction.run(RefreshBugzillaReportsAction.java:193)
	at org.eclipse.ui.internal.PluginAction.runWithEvent(PluginAction.java:246)
	at
org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:538)
	at
org.eclipse.jface.action.ActionContributionItem.access$2(ActionContributionItem.java:488)
	at
org.eclipse.jface.action.ActionContributionItem$6.handleEvent(ActionContributionItem.java:441)
	at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:66)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:843)
	at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3080)
	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:2713)
	at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:1699)
	at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:1663)
	at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:367)
	at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:143)
	at org.eclipse.ui.internal.ide.IDEApplication.run(IDEApplication.java:103)
	at
org.eclipse.core.internal.runtime.PlatformActivator$1.run(PlatformActivator.java:226)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:376)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:163)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
	at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:585)
	at org.eclipse.core.launcher.Main.invokeFramework(Main.java:334)
	at org.eclipse.core.launcher.Main.basicRun(Main.java:278)
	at org.eclipse.core.launcher.Main.run(Main.java:973)
	at org.eclipse.core.launcher.Main.main(Main.java:948)
Caused by: java.lang.IllegalArgumentException: 
	at org.eclipse.core.internal.runtime.Assert.isLegal(Assert.java:58)
	at org.eclipse.core.internal.runtime.Assert.isLegal(Assert.java:42)
	at org.eclipse.core.runtime.Status.setMessage(Status.java:174)
	at org.eclipse.core.runtime.Status.<init>(Status.java:81)
	at
org.eclipse.mylar.bugzilla.core.search.BugzillaSearchEngine.search(BugzillaSearchEngine.java:283)
	at
org.eclipse.mylar.bugzilla.ui.tasklist.BugzillaCategorySearchOperation.search(BugzillaCategorySearchOperation.java:93)
	at
org.eclipse.mylar.bugzilla.ui.tasklist.BugzillaCategorySearchOperation.execute(BugzillaCategorySearchOperation.java:71)
	at
org.eclipse.mylar.bugzilla.ui.tasklist.BugzillaQueryCategory.refreshBugs(BugzillaQueryCategory.java:114)
	at
org.eclipse.mylar.bugzilla.ui.actions.RefreshBugzillaReportsAction$2.run(RefreshBugzillaReportsAction.java:168)
	at org.eclipse.ui.internal.UILockListener.doPendingWork(UILockListener.java:150)
	at org.eclipse.ui.internal.UISynchronizer$1.run(UISynchronizer.java:36)
	at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:35)
	at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:123)
	... 34 more


Task details update failed
java.lang.NullPointerException
at
org.eclipse.mylar.bugzilla.ui.tasklist.BugzillaTask.updateTaskDetails(BugzillaTask.java:354)
at
org.eclipse.mylar.bugzilla.ui.tasklist.BugzillaTask$GetBugReportJob.run(BugzillaTask.java:340)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:76)


Comment 3 Shawn Minto CLA 2005-08-17 13:21:56 EDT
The problem here is that Collabnet is a customized version of bugzilla which
we are currently unable to support unless we add a new parser for it so that
we can properly do the screen scraping.
Comment 4 Mik Kersten CLA 2005-08-17 13:44:06 EDT
Could you add proper error handling for that, and pop up a dialog saying
something like "The Bugzilla version you are using is either not supported, or
you need to change the Bugzilla preferences to us the correct version number." 
The fileds showing up blank is confusing.  Also, under "Known Limitations" could
you add that customized versions of bugzilla are not supported?
Comment 5 Mik Kersten CLA 2005-08-17 13:48:01 EDT
We'll have to make sure to closely support anyone interested in extending the 
Bugzilla client to customized versions.  But once you've done the extra error
checking we'll have to mark down the priority because we don't have the
resources to do it ourselves for 0.3.x.

Perhaps the work-around for people using this version is to have them create a
"custom query" via HTMl and use the internal browser for viewing reports?
Comment 6 Shawn Minto CLA 2005-08-17 13:53:57 EDT
I will add a dialog that informs the user that we were unable to get any data 
from the bugzilla server and it may be becuase there are problems with the 
server or the server being used is not supported due to being customized.
Comment 7 Eugene Kuleshov CLA 2005-08-17 14:10:19 EDT
(In reply to comment #5)
> We'll have to make sure to closely support anyone interested in extending the 
> Bugzilla client to customized versions.  But once you've done the extra error
> checking we'll have to mark down the priority because we don't have the
> resources to do it ourselves for 0.3.x.

How difficult it is to support a customized bugzilla version? Is there are an
infrastructure for this? 

I guess "bugzilla version" property should be configured per repository. See my
summary at http://dev.eclipse.org/mhonarc/lists/mylar-dev/msg00037.html

> Perhaps the work-around for people using this version is to have them create a
> "custom query" via HTMl and use the internal browser for viewing reports?

This is quite usless because you can't create mylar's context for query results.
Comment 8 Mik Kersten CLA 2005-08-17 14:18:36 EDT
Yup Eugene, this sort of customization support will be a part of the longer-term
repository support strategy that you outlined.  Fyi I'll answer your message
today or tomorrow, still thinking about the best appraoch..

You should definitely be able to create a context for a query hit just by
hitting the glasses.  Then you'll notice that the big bug icon turns into a
little bug over a clipboard, indicating that it's not just a hit anymore, but a
report and context stored locally.  Please report a new bug if this doesn't work.
Comment 9 Eugene Kuleshov CLA 2005-08-17 14:37:01 EDT
(In reply to comment #8)
> You should definitely be able to create a context for a query hit just by
> hitting the glasses.  Then you'll notice that the big bug icon turns into a
> little bug over a clipboard, indicating that it's not just a hit anymore, but a
> report and context stored locally.  Please report a new bug if this doesn't work.

What I've tried to say is that it won't work on a list of bugs shown in web page
as you've suggested for nonstandard repositories. :-)
Comment 10 Mik Kersten CLA 2005-08-17 14:46:34 EDT
Ah.  Yes, that's right, we would need at least the support for gathering query
results.  But that's a lot simpler then all the suff needed for the bug editor
and for the Query UI.

Shawn: could you comment on bug #107062 about how hard the custom query thing
would be to implement?
Comment 11 Eugene Kuleshov CLA 2005-08-17 15:10:16 EDT
(In reply to comment #10)
> Ah.  Yes, that's right, we would need at least the support for gathering query
> results.  But that's a lot simpler then all the suff needed for the bug editor
> and for the Query UI.

I believe it would be fine to have custom parser for the results anf everything
else in the UI (query editor, bug details, etc.). This was the approach taken by
Buglist plugin.

> Shawn: could you comment on bug #107062 about how hard the custom query thing
> would be to implement?

I can try to get some support from Collabnet to help with the parser.
Comment 12 Mik Kersten CLA 2005-08-17 15:14:25 EDT
That would be fantastic.  The only thing we should be careful about is to figure
out whether our Bugzilla plug-in should be parsing XML in some places where it
currently isn't, in case this helps insulate it from customizations.

I guess the first thing to do is to have us try and make the custom query stuff
work since it is possible for them to work for CollabNet, and then see what else
needs doing.  I'm changing the priorities of these two bugs accordingly.
Comment 13 Mik Kersten CLA 2005-08-29 13:38:04 EDT
We don't have the resources for it right now, but will try to involve 
CollabNet or other developers to help out.
Comment 14 Marco CLA 2005-11-15 11:01:46 EST
can i help you to develop this parser for CollabNet? i can make it in my 
thesis, please contact me at: marco.sferra@virgilio.it
Comment 15 Mik Kersten CLA 2005-11-15 13:25:48 EST
Marco: contributing CollabNet support would be a very useful contribution, and
would help make the current Bugzilla support generic enough to handle customized
Bugzilla implementations.  Let's start out by discussing what's involved on this
report.  The main thing will likely be adapting the fragile screen scraping that
we do.  What would be great is if you could try it with a common CollabNet
installation (e.g. the http://subclipse.tigris.org/issues/ Eugene suggests) and
Outline what breaks and what the failures are.  To start I would ignore making
the Bug Editor work, since we can always fall back to the web editor.  But what
we really do need is query results to be populated.  So I suggest starting by
adding a new "Custom Query" for Tigris (see top of New Bugzilla Query box) and
see what works/fails in getting the query results.
Comment 16 Marco CLA 2005-11-16 12:03:37 EST
Ok, i will begin and i hope to have understood what i have to do...i will send 
to you what breaks and what the failures are. if you need me you can send 
everything at marco.sferra@virgilio.it
Comment 17 Marco CLA 2005-11-18 04:39:44 EST
I tried to submit a query in Tigris and it reports to me everything...it 
doesn't show to me bugs in the editor. now i will tried to see more
Comment 18 Mik Kersten CLA 2005-11-18 09:58:19 EST
Good to hear that query results are showing up.  What is the failure in the Bug
Editor?  I would like it to fail softly and fall back on using the Web Browser.
 If you could paste in the query string that you are using that would be useful too.
Comment 19 Marco CLA 2005-11-21 11:04:22 EST
if you try to see some bug it reports this error

java.lang.NullPointerException
	at org.eclipse.mylar.bugzilla.ui.editor.ExistingBugEditor.getTitleString(ExistingBugEditor.java:307)
	at org.eclipse.mylar.bugzilla.ui.editor.AbstractBugEditor.createAttributeLayout(AbstractBugEditor.java:521)
	at org.eclipse.mylar.bugzilla.ui.editor.AbstractBugEditor.createLayouts(AbstractBugEditor.java:509)
	at org.eclipse.mylar.bugzilla.ui.editor.AbstractBugEditor.createInfoArea(AbstractBugEditor.java:452)
	at org.eclipse.mylar.bugzilla.ui.editor.AbstractBugEditor.createPartControl(AbstractBugEditor.java:352)
	at org.eclipse.ui.internal.EditorReference.createPartHelper(EditorReference.java:609)
	at org.eclipse.ui.internal.EditorReference.createPart(EditorReference.java:384)
	at org.eclipse.ui.internal.WorkbenchPartReference.getPart(WorkbenchPartReference.java:552)
	at org.eclipse.ui.internal.PartPane.setVisible(PartPane.java:283)
	at org.eclipse.ui.internal.presentations.PresentablePart.setVisible(PresentablePart.java:126)
	at org.eclipse.ui.internal.presentations.util.PresentablePartFolder.select(PresentablePartFolder.java:268)
	at org.eclipse.ui.internal.presentations.util.LeftToRightTabOrder.select(LeftToRightTabOrder.java:65)
	at org.eclipse.ui.internal.presentations.util.TabbedStackPresentation.selectPart(TabbedStackPresentation.java:391)
	at org.eclipse.ui.internal.PartStack.refreshPresentationSelection(PartStack.java:1102)
	at org.eclipse.ui.internal.PartStack.setSelection(PartStack.java:1051)
	at org.eclipse.ui.internal.PartStack.showPart(PartStack.java:1256)
	at org.eclipse.ui.internal.PartStack.add(PartStack.java:442)
	at org.eclipse.ui.internal.EditorStack.add(EditorStack.java:109)
	at org.eclipse.ui.internal.EditorSashContainer.addEditor(EditorSashContainer.java:60)
	at org.eclipse.ui.internal.EditorAreaHelper.addToLayout(EditorAreaHelper.java:212)
	at org.eclipse.ui.internal.EditorAreaHelper.addEditor(EditorAreaHelper.java:202)
	at org.eclipse.ui.internal.EditorManager.createEditorTab(EditorManager.java:758)
	at org.eclipse.ui.internal.EditorManager.openEditorFromDescriptor(EditorManager.java:665)
	at org.eclipse.ui.internal.EditorManager.openEditor(EditorManager.java:628)
	at org.eclipse.ui.internal.WorkbenchPage.busyOpenEditorBatched(WorkbenchPage.java:2360)
	at org.eclipse.ui.internal.WorkbenchPage.busyOpenEditor(WorkbenchPage.java:2295)
	at org.eclipse.ui.internal.WorkbenchPage.access$9(WorkbenchPage.java:2287)
	at org.eclipse.ui.internal.WorkbenchPage$9.run(WorkbenchPage.java:2273)
	at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:69)
	at org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPage.java:2268)
	at org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPage.java:2241)
	at org.eclipse.mylar.bugzilla.ui.ViewBugzillaAction.runInUIThread(ViewBugzillaAction.java:72)
	at org.eclipse.ui.progress.UIJob$1.run(UIJob.java:93)
	at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:35)
	at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:123)
	at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:3057)
	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:2716)
	at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:1699)
	at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:1663)
	at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:367)
	at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:143)
	at org.eclipse.ui.internal.ide.IDEApplication.run(IDEApplication.java:103)
	at org.eclipse.core.internal.runtime.PlatformActivator$1.run(PlatformActivator.java:226)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:376)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:163)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
	at java.lang.reflect.Method.invoke(Unknown Source)
	at org.eclipse.core.launcher.Main.invokeFramework(Main.java:334)
	at org.eclipse.core.launcher.Main.basicRun(Main.java:278)
	at org.eclipse.core.launcher.Main.run(Main.java:973)
	at org.eclipse.core.launcher.Main.main(Main.java:948)

and in query result there is only ONE bug while on the site there are 250 bugs...
Comment 20 Mik Kersten CLA 2005-11-25 14:32:15 EST
Marco: is it possible for you to give me a link to the CollabNet repository?  What I could do is make the Bug Editor display the report in a web page if it fails to render it.

Getting a single query result means that the query parser is not working correctly.  The problem will be in the BugzillaSearchEngine.search(..) method, which is failing to match regular expressions.  Note how I made it work for Bugzilla 2.20, and you may be able to create a patch that does something similar for CollabNet.  That will need to be done in a test-driven way because this messy and old code is very brittle.  So I suggest looking at the related Bugzilla tests, writing a new search test that works for a public Bugzilla 2.20 server (e.g. eclipse.org), then adding one for CollabNet and regular expressions for making it pass.  Note RegularExpressionMatch test, sine you may want to start with something like that.  Let me know how it goes.
Comment 21 Eugene Kuleshov CLA 2005-11-25 16:00:39 EST
Here are few repositories based on CollabNet Bugzilla:

Subclipse traker at tigris.org
http://subclipse.tigris.org/issues/buglist.cgi?Submit+query=Submit+query&issue_status=NEW&issue_status=STARTED&issue_status=REOPENED&email1=&emailtype1=exact&emailassigned_to1=1&email2=&emailtype2=exact&emailreporter2=1&issueidtype=include&issue_id=&changedin=&votes=&chfieldfrom=&chfieldto=Now&chfieldvalue=&short_desc=&short_desc_type=substring&long_desc=&long_desc_type=substring&issue_file_loc=&issue_file_loc_type=substring&status_whiteboard=&status_whiteboard_type=substring&field0-0-0=noop&type0-0-0=noop&value0-0-0=&cmdtype=doit&newqueryname=&order=Reuse+same+sort+as+last+time

Some project ad BEA dev2dev
https://xcommonj-work.projects.dev2dev.bea.com/issues/buglist.cgi?Submit+query=Submit+query&component=xcommonj-work&subcomponent=www&issue_status=NEW&issue_status=STARTED&issue_status=REOPENED&version=current&email1=&emailtype1=exact&emailassigned_to1=1&email2=&emailtype2=exact&emailreporter2=1&issueidtype=include&issue_id=&changedin=&votes=&chfieldfrom=&chfieldto=Now&chfieldvalue=&short_desc=&short_desc_type=substring&long_desc=&long_desc_type=substring&issue_file_loc=&issue_file_loc_type=substring&status_whiteboard=&status_whiteboard_type=substring&field0-0-0=noop&type0-0-0=noop&value0-0-0=&cmdtype=doit&order=Issue+Number

Glassfish project at java.net
https://glassfish.dev.java.net/issues/buglist.cgi?Submit+query=Submit+query&component=glassfish&issue_status=NEW&issue_status=STARTED&issue_status=REOPENED&version=9.0pe&email1=&emailtype1=exact&emailassigned_to1=1&email2=&emailtype2=exact&emailreporter2=1&issueidtype=include&issue_id=&changedin=&votes=&chfieldfrom=&chfieldto=Now&chfieldvalue=&short_desc=&short_desc_type=substring&long_desc=&long_desc_type=substring&issue_file_loc=&issue_file_loc_type=substring&status_whiteboard=&status_whiteboard_type=substring&field0-0-0=noop&type0-0-0=noop&value0-0-0=&cmdtype=doit&namedcmd=glassfish_bugs&newqueryname=&order=Reuse+same+sort+as+last+time
Comment 22 Marco CLA 2005-11-26 13:37:25 EST
ok, i will see to create a method to send a regular expression to collabnet server.

thanks eugene
Comment 23 Marco CLA 2005-12-04 09:49:07 EST
i can write regular expression for collabnet but i did't find regular expression library...please post link else i can't try and post my code
Comment 24 Marco CLA 2005-12-04 15:30:35 EST
i have the code but now there are two way to insert this in the class:
one is easy but in that class will be very hard change something..
second is very long to do because i have to rewrite a lot of methods, but in the future we can add a lot of regular expression in easy way
what do you think?
Comment 25 Mik Kersten CLA 2005-12-09 13:51:40 EST
Since the Bugzilla Client has very insufficient test coverage minimizing changes to the code is key.  What would be great is if you could put most of the code into a unit test that demonstrates how it works (including parsing from a server), and then we could iterate on generalizing the bugzilla stuff to support additional regular expressions, etc.  Would that work?
Comment 26 Marco CLA 2005-12-10 05:06:06 EST
ok, see this test and tell me what do you think.
download code from: http://www.kekkko86.altervista.org/file/test.rar
Comment 27 Mik Kersten CLA 2005-12-14 16:06:43 EST
That's a great start Marco.  The next step is to make this run as a unit test, and to contribute it as a patch by attaching the patch to this report.  See instructions on http://eclipse.org/mylar/dev.php on patches.

Make the test similar to org.eclipse.mylar.bugzilla.tests.RegularExpressionMatchTest.  However, you should make the patch go into org.eclipse.mylar.sandbox/testsrc since it won't be run as a part of the regular test suite.  
Comment 28 Marco CLA 2005-12-18 12:56:15 EST
try this and tell me more
http://kekkko86.altervista.org/file/Mylar%20Patch.rar
Comment 29 Mik Kersten CLA 2005-12-18 19:04:10 EST
The patch needs to be attached to the Bugzilla report in order to make it possible to check into CVS (due licensing details).  Could you please add it as an attachment via the "Create a New Attachment" link visible in the web UI?
Comment 30 Marco CLA 2005-12-19 04:47:38 EST
Created attachment 31935 [details]
CollabNet support
Comment 31 Marco CLA 2006-01-10 04:46:56 EST
what i have to do now?
Comment 32 Mik Kersten CLA 2006-01-17 22:30:18 EST
Sorry for the slow reply Marco.  Please read comment#27 for what should be created
for the patch--this will need to be done in a test-driven way, and should not
modify bugzilla.core.  You could extend the search engine class if that helps
write the test.
Comment 33 Marco CLA 2006-01-27 10:57:40 EST
sorry mik, i did patch for bugzilla.search and i did test for this patch...now i don't understand what i have to change. have you seen my patch?
Comment 34 Marco CLA 2006-01-28 17:13:18 EST
mik, i build a new patch for mylar 4.7. Tell me what do you think about this.
Comment 35 Marco CLA 2006-01-28 17:14:37 EST
Created attachment 33757 [details]
CollabNet support
Comment 36 Mik Kersten CLA 2006-01-30 13:29:21 EST
Marco, this is the comment I thought I had posted to the bug last week but just noticed it didn't go through.  Will look at your patch today or tomorrow.

---
The patch can not be made to the org.eclipse.mylar.bugzilla.core project because that could break existing support.  The patch needs to go in as a test case to org.eclipse.mylar.sandbox.  To make this easier I have crated the following class for you: org.eclipse.mylar.sandbox.tests.CollabNetRegularExpressionTest

Now, I realize that BugzillaSearchEngine.createHit(..) won't do the right thing for you.  So either create your own method in the test case that will, or let me know and I can make BugzillaSearchEngine extensible so that your test case can create a subclass and override createHit(..).  Either way all of your changes should be localized to the test case for the time being.  Happy hacking :)
Comment 37 Marco CLA 2006-02-04 10:36:46 EST
ok, look this and tell me more :)
Comment 38 Marco CLA 2006-02-04 10:39:02 EST
Created attachment 34145 [details]
collabnet -sandbox
Comment 39 Mik Kersten CLA 2006-02-06 22:13:49 EST
Several problems:
- Patches need to be created using the patching mechanism, see 
  http://www.eclipse.org/mylar/doc/contributing.php for more info
- Note the above instructions on formatting
- Patch didn't compile, but organizing imports and a fixing a variable reference fixed that.

Other than that, the patch looks promising and I have committed it.  So you
should synch up to make sure that you are using the latest one, and base
future patches off that.  

Now the thing to do is to give your testMatchV220 method a more accurate name, and 
add an assertion for every read method that you have, to ensure that they all behave
as expected.  
Comment 40 Marco CLA 2006-02-10 11:01:44 EST
Created attachment 34502 [details]
collabnet-sandbox
Comment 41 Marco CLA 2006-02-10 11:04:26 EST
Mik, i did it. look this and tell me more :D
Comment 42 Mik Kersten CLA 2006-02-20 14:55:03 EST
Sorry for the slowness Marco, this has had to get scheduled behind refactorings 
to the task list to better support multiple repository providers.  I plan on looking
over your patch tomorrow or next day.
Comment 43 Mik Kersten CLA 2006-02-27 22:14:14 EST
Marco, I tried to apply the patch, but the test fails with the following:

junit.framework.ComparisonFailure: expected:<nor> but was:<<td class="red"><span class="issue_type">nor</span>>
	at junit.framework.Assert.assertEquals(Assert.java:81)

Also, please generate patches for the project, not just for the file (see http://www.eclipse.org/mylar/doc/devref.php#contributing-patches).
Comment 44 Marco CLA 2006-03-04 08:59:48 EST
Created attachment 35718 [details]
support CollabNet
Comment 45 Mik Kersten CLA 2006-03-07 23:42:04 EST
Marco, this patch is still not created correctly (it's a patch for 2 files,
which makes it hard to apply, not for a project).  Please re-read the instructions
at: http://www.eclipse.org/mylar/doc/devref.php#contributing-patches
(and create the patch by right-clicking the project or change set).
Comment 46 Marco CLA 2006-03-10 07:52:11 EST
Created attachment 36052 [details]
collab support

sorry mik for this loss of time and my errors
Comment 47 Mik Kersten CLA 2006-03-17 11:58:23 EST
We've had our hands full with 0.4.10 and EclipseCon, will plan to review this next week.
Comment 48 Marco CLA 2006-03-18 08:49:26 EST
Created attachment 36551 [details]
CollabNET support
Comment 49 Mik Kersten CLA 2006-04-12 14:30:40 EDT
Marco: it is now looking promising for the solution discussed on bug 136219 to provide a robust solution to this.  Before continuing further on making the HTML parsing work for CollabNet we need to investigate that in case it removes the need for HTML parsing entirely.  Will keep you posted on this and the corresponding report.
Comment 50 Mik Kersten CLA 2006-05-22 19:38:50 EDT
Mylar 0.5.2, released today, no longer relies on HTML parsing and interoperates with customized repositories such as RedHat.  As such CollabNet integration should be considerably easier.  

Rob, you did a bit of exploration here, what did you learn?
Comment 51 Eugene Kuleshov CLA 2006-05-22 19:41:46 EDT
(In reply to comment #50)
> Mylar 0.5.2, released today, no longer relies on HTML parsing and interoperates
> with customized repositories such as RedHat.  As such CollabNet integration
> should be considerably easier.  

I guess it will still require something for detecting and handling base repository url, since it could be moved around quite a bit...
Comment 52 Robert Elves CLA 2006-05-23 15:49:36 EDT
Looking at http://subclipse.tigris.org/issues/ , I couldn't get access to reports in xml format (ctype=xml) nor could I get to a config.cgi. Both of these are required for the bugzilla connector to work.
Comment 53 Eugene Kuleshov CLA 2006-05-23 16:16:11 EDT
(In reply to comment #52)
> Looking at http://subclipse.tigris.org/issues/ , I couldn't get access to
> reports in xml format (ctype=xml) nor could I get to a config.cgi. Both of
> these are required for the bugzilla connector to work.

Try this: http://subclipse.tigris.org/issues/xml.cgi?output_configured=true&id=103:117:131:135:215:268:306:321:351:378:385:386:394:397:401:412:414:418:421:422:423:437:440:442:449:450:456:463:464:469:471:472:473:474:476:479:481:482:484:485:491:493:494:495:496:497&include_attachments=true&download_type=browser

Apparently you need to get list of id's from somewhere. Not sure how to get that list other then html. I can try to ask CollabNet folks...
Comment 54 Robert Elves CLA 2006-05-23 17:02:52 EDT
Perfect, this will get us bug reports, now we just need the configuration (products, milestones, components, status values, etc as rdf), oh and can we get query results in rdf (I guess this would be the list of ids you mentioned)? 
Comment 55 Robert Elves CLA 2006-06-02 17:26:37 EDT
Required data from Collabnet:

1) Query results in RDF format. Example: https://bugs.eclipse.org/bugs/buglist.cgi?query_format=advanced&short_desc_type=allwordssubstr&short_desc=&product=Mylar&component=Bugzilla&long_desc_type=allwordssubstr&long_desc=&bug_file_loc_type=allwordssubstr&bug_file_loc=&status_whiteboard_type=allwordssubstr&status_whiteboard=&keywords_type=allwords&keywords=&bug_status=RESOLVED&emailtype1=substring&email1=&emailtype2=substring&email2=&bugidtype=include&bug_id=&votes=&chfieldfrom=&chfieldto=Now&chfieldvalue=&cmdtype=doit&order=Reuse+same+sort+as+last+time&field0-0-0=noop&type0-0-0=noop&value0-0-0=&ctype=rdf

Note: We also use the query facility to reduce the amount of synchronizing by querying for reports that have changed since a given date/time (accurate to second).

2) Issues/reports in XML format. Example:
https://bugs.eclipse.org/bugs/show_bug.cgi?id=106990&ctype=xml

Content needs to include issue attributes, comments, and attachments.

3) Repository configuration in RDF. Example:
https://bugs.eclipse.org/bugs/config.cgi?ctype=rdf

Products, components, valid status values, mappings between products, components, and target milestones, etc.

Note that this link may display an error in your browser. The source is okay but we have been forced to clean it up ourselves. Ideally the product and component names etc would be properly escaped so as to avoid this problem.
Comment 56 Eugene Kuleshov CLA 2006-06-02 18:02:39 EDT
(In reply to comment #55)

Rob, this is for ideal situation. However I believe that there should be some support for existing installations.

> Required data from Collabnet:
> 
> 1) Query results in RDF format. Example:
> https://bugs.eclipse.org/bugs/buglist.cgi?query_format=advanced&short_desc_type=allwordssubstr&short_desc=&product=Mylar&component=Bugzilla&long_desc_type=allwordssubstr&long_desc=&bug_file_loc_type=allwordssubstr&bug_file_loc=&status_whiteboard_type=allwordssubstr&status_whiteboard=&keywords_type=allwords&keywords=&bug_status=RESOLVED&emailtype1=substring&email1=&emailtype2=substring&email2=&bugidtype=include&bug_id=&votes=&chfieldfrom=&chfieldto=Now&chfieldvalue=&cmdtype=doit&order=Reuse+same+sort+as+last+time&field0-0-0=noop&type0-0-0=noop&value0-0-0=&ctype=rdf
> 
> Note: We also use the query facility to reduce the amount of synchronizing by
> querying for reports that have changed since a given date/time (accurate to
> second).

As I suggested before you can get list of id's with minimum html parsing even for queries with date/time. Then second query can be used to retrieve all details for those id's.

Besides, it sounds like repository-specific optimization and may not be generally avaialable on XYZ repository provider.

> 2) Issues/reports in XML format. Example:
> https://bugs.eclipse.org/bugs/show_bug.cgi?id=106990&ctype=xml
> Content needs to include issue attributes, comments, and attachments.

http://subclipse.tigris.org/issues/xml.cgi?id=497

Attachments are encoded in base64.

> 3) Repository configuration in RDF. Example:
> https://bugs.eclipse.org/bugs/config.cgi?ctype=rdf
> 
> Products, components, valid status values, mappings between products,
> components, and target milestones, etc.
> 
> Note that this link may display an error in your browser. The source is okay
> but we have been forced to clean it up ourselves. Ideally the product and
> component names etc would be properly escaped so as to avoid this problem.

This one is still unclear know how to get. As a fall back, maybe it can be just manually configured in repository provider preferences with some defaults.
Comment 57 Eugene Kuleshov CLA 2007-09-10 18:58:27 EDT
Free Mylyn connector for CollabNet IssueZilla/IssueTracker is available from http://eclipse.open.collab.net/