Community
Participate
Working Groups
Provide an implementation for TracTask and TracTaskExternalizer and a wizard for adding existing tasks.
Steffen, please base this on the Jira externalizer and try to externalize as little additional state as possible. Fyi, we are likely going to create a single generic externalizer sometime in July, and seeing what additional state you need to externalize will be useful
Created attachment 45751 [details] Extension for repository connector and externalizer The patch includes the externalizer and extension declarations. I'll add a patch for adding of existing tasks later today.
Created attachment 45812 [details] Wizard for adding existing tasks The wizard class is exactly the same as for Jira and Bugzilla. The implementation of addPage() and getTaskId() could be moved to the super class without a loss of flexibility. That way connectors would not have to extend the wizard but could use the default implementation. The patch also includes some refactoring of the test fixture stuff for better reusability throughout the test suite.
Created attachment 45813 [details] mylar/context/zip
Patch applied. I fixed up the wizard banner and titles, and also pulled up addPage() and getTaskId() as you suggested since all 4 clients had the same implementation. Eugene, note that affected your wizard too (no change other than the refactoring). I tried to add an existing task with http://projects.edgewall.com/trac (anonymous) for id 287 but got the following failure. org.eclipse.mylar.internal.trac.core.TracException: org.eclipse.mylar.internal.trac.core.TracXmlRpcClient$HttpException: HTTP Error 404 at org.eclipse.mylar.internal.trac.core.TracXmlRpcClient.call(TracXmlRpcClient.java:78) at org.eclipse.mylar.internal.trac.core.TracXmlRpcClient.getTicket(TracXmlRpcClient.java:142) at org.eclipse.mylar.internal.trac.TracRepositoryConnector.createTaskFromExistingKey(TracRepositoryConnector.java:157) at org.eclipse.mylar.internal.tasklist.ui.wizards.AbstractAddExistingTaskWizard.performFinish(AbstractAddExistingTaskWizard.java:42) Also, I'm still seeing this failure in AllTracTests: java.lang.ClassCastException: org.apache.xmlrpc.XmlRpcException at org.eclipse.mylar.internal.trac.core.TracXmlRpcClient.getTicket(TracXmlRpcClient.java:142) at org.eclipse.mylar.trac.tests.AbstractTracClientSearchTest.testGetTicketInvalidId(AbstractTracClientSearchTest.java:81) 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)
Concerning the first exception: The edgewall repository can not be accessed through XML-RPC (only through the "Trac 0.9 and higher" access type). If you do a "Validate Settings" in the repository settings dialog a message should pop up saying that there is no repository at that location. There is a bug in Trac's repository settings page though, so the access type may not have been correctly set. If have attached a fix to bug 147817. Concerning the second exception: Could you check if you are using the latest version (2.0.1) of the org.apache.xmlrpc plug-in?
Mik, why getAddExistingTaskWizard(TaskRepository repository) is now return Wizard and not IWizard instance? PS: it is weird, but I couldn't use Bugzilla editor to submit this comment. It says that credentials are invalid and leave the following info message in the Eclipse log. eclipse.buildId=M20060629-1905 java.version=1.5.0_07 java.vendor=Sun Microsystems Inc. BootLoader constants: OS=win32, ARCH=x86, WS=win32, NL=en_US Command-line arguments: -os win32 -ws win32 -arch x86 -data C:\dev\workspace Info Thu Jul 06 12:40:16 EDT 2006 Mylar: Attributes: bug_status=ASSIGNED | resolution= | bug_id=149385 | rep_platform=All | product=Mylar | op_sys=All | component=Core | version=unspecified | priority=P1 | bug_severity=enhancement | assigned_to=steffenp@gmx.de | target_milestone=--- | reporter=steffenp@gmx.de | dependson= | blocked= | bug_file_loc= | newcc= | keywords= | creation_ts=2006-07-01 20:49 | short_desc=Trac connector: implement externalizer and adding of existing tickets | delta_ts=2006-07-05 21:13:46 | cc=eu@md.pp.ru | longdesclength=5 | , source: java.lang.Class
(In reply to comment #7) > PS: it is weird, but I couldn't use Bugzilla editor to submit this comment. It > says that credentials are invalid and leave the following info message in the > Eclipse log. I have hit the same problem each time Eclipse is restarted (I am working boot-strapped out of head). A warning message is displayed "Repository does not have credentials set, verify via Task Repositories View view" forcing me to reenter my credentials.
Eugene: I made that change to be able to set the title on the wizard that was returned, but now that it's common it's back to IWizard. Steffen: - AllTracTests passes for me, problem was that I didn't have the xmlrpc plug-in synched. - I changed settings to 0.9 and higher, and successfully added a ticket, good stuff :) - Consider removing the "#" from the ticket ID, it's redundant (Bugzilla used to use it too) Rob: please look problem listed in comment#7 and #8 and advise.
re comment#7, Eugene, when you got that message in your log was it just after a web dialog was displayed showing a bugzilla error? If so was there another entry in the log with an html dump? If so could you fire that to me? Thanks. re comment#8 Steffen, when you go to the edit repository view are your credentials in fact blank?
(In reply to comment #10) > re comment#8 Steffen, when you go to the edit repository view are your > credentials in fact blank? Yes.
That indicates the message is correct. The credentials disappear when changing Eclipse versions. We should be prompting for them the way CVS does (bug 149607).
(In reply to comment #12) > That indicates the message is correct. The credentials disappear when changing > Eclipse versions. We should be prompting for them the way CVS does (bug > 149607). Mik, in my case credentials wasn't empty. Rob, there was only that message in the log.
(In reply to comment #12) > That indicates the message is correct. The credentials disappear when changing > Eclipse versions. We should be prompting for them the way CVS does (bug > 149607). I didn't change Eclipse versions but I did clear the configuration area. That explains my problem (which doesn't seem to be related to Eugene's).
Okay thanks for the confirmation Steffan. Eugene, if this persists lets open a new bug report.