Bug 175211 - Support Trac 0.11
Summary: Support Trac 0.11
Status: RESOLVED FIXED
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: Mylyn (show other bugs)
Version: unspecified   Edit
Hardware: PC Linux
: P2 enhancement with 12 votes (vote)
Target Milestone: 3.2   Edit
Assignee: Steffen Pingel CLA
QA Contact:
URL: http://trac-hacks.org/ticket/1075
Whiteboard:
Keywords: helpwanted, noteworthy
: 175657 275451 (view as bug list)
Depends on: 199497 223173
Blocks:
  Show dependency tree
 
Reported: 2007-02-22 20:43 EST by Steffen Pingel CLA
Modified: 2009-06-27 15:07 EDT (History)
24 users (show)

See Also:


Attachments
enables Trac 0.11 tests (5.24 KB, text/plain)
2007-03-05 02:41 EST, Steffen Pingel CLA
no flags Details
mylar/context/zip (4.95 KB, application/octet-stream)
2007-03-05 02:41 EST, Steffen Pingel CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Steffen Pingel CLA 2007-02-22 20:43:02 EST
Refactor test cases to run against Trac 0.11.
Comment 1 Steffen Pingel CLA 2007-02-22 21:33:04 EST
 * TracWebClient.getTicket() needs to be fixed due to changes in the HTML output.
 * TracXmlRpcClient.search() returns a remote error.
 * TracXmlRpcClient.getTicket() returns a remote error.
 
 See comments at http://trac-hacks.org/ticket/1075 .
Comment 2 Steffen Pingel CLA 2007-02-28 11:01:21 EST
*** Bug 175657 has been marked as a duplicate of this bug. ***
Comment 3 Steffen Pingel CLA 2007-03-05 02:41:14 EST
Created attachment 60245 [details]
enables Trac 0.11 tests
Comment 4 Steffen Pingel CLA 2007-03-05 02:41:16 EST
Created attachment 60246 [details]
mylar/context/zip
Comment 5 Steffen Pingel CLA 2007-03-05 02:45:29 EST
The remote XML-RPC errors have been fixed in the latest XML-RPC patch for Trac 0.11. Mylar needs to be updated to expect Date objects instead of integers for Trac 0.11. 
Comment 6 Steffen Pingel CLA 2007-03-07 15:01:38 EST
Committed fix for parsing dates. Mylar should now work with Trac 0.11dev through XML-RPC (requires latest 0.11 patch forTrac  XmlRpcPlugin).
Comment 7 Gerrit Brehmer CLA 2007-07-01 14:27:31 EDT
I had problems with the latest development build from trac (0.11dev-r5790) and XMLRPC (Rev. 2358) with latest Patch from Ben (found here: http://trac-hacks.org/ticket/1075) and Mylyn 2.0 of course.

Create a new ticket raises always an exception: 
'__init__() takes exactly 2 arguments (3 given)' while executing 'ticket.status.get()'
Update Attributes gives the same exception.

After that I have debugged the function (inside mylyn/eclipse): Call and parameters seems okay, but "ticket.status.get" returns alwaye an exception. "ticket.status.getAll" is okay! So I have disabled the next calls for each status and generate the integer values manually.
After that a new exception after creating/reading the new task occurs:
unsubscriptable object in "getAvailableActions"
So I have disabled the calling for "getAvailableActions". I don't know if the results are needed but after that, the task creating, reading, updating etc. functions properly.
If someone needs the patch I can post it but I don't if there are side effects because I have disabled two rpc-calls.
Comment 8 Gerrit Brehmer CLA 2007-07-01 15:54:08 EDT
Sorry, yes now I know why the getAvailableActions method is required: I can't close/reopen etc a task. Probably it's a xmlrpc-trac-plugin problem.
Comment 9 Steffen Pingel CLA 2007-07-02 10:56:10 EDT
This needs be fixed on the Trac side. The patch for the XmlRpcPlugin needs to updated for the latest changes in the Trac trunk.
Comment 10 Steffen Pingel CLA 2007-09-08 17:22:52 EDT
Due to the changed ticket workflow updating of attributes does not work properly with the latest revision of Trac:

java.lang.NumberFormatException: For input string: "reopened"
at java.lang.NumberFormatException.forInputString(NumberFormatException.java:48)
at java.lang.Integer.parseInt(Integer.java:447)
at java.lang.Integer.parseInt(Integer.java:497)
at org.eclipse.mylyn.internal.trac.core.TracXmlRpcClient.getTicketAttributes(TracXmlRpcClient.java:536)
at org.eclipse.mylyn.internal.trac.core.TracXmlRpcClient.updateAttributes(TracXmlRpcClient.java:412)
at org.eclipse.mylyn.internal.trac.core.AbstractTracClient.updateAttributes(AbstractTracClient.java:145)
at org.eclipse.mylyn.internal.trac.ui.wizard.TracCustomQueryPage$4.run(TracCustomQueryPage.java:391)
at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:113)
Comment 11 Steffen Pingel CLA 2007-09-08 17:58:06 EDT
Committed fix for updating attributes to CVS.
Comment 12 Rainer Sokoll CLA 2007-09-09 03:29:57 EDT
- Trac 0.11dev-r5999
- TracXMLRPC 1.0.0 w/ patch http://trac-hacks.org/attachment/ticket/1075/ticket-validate.diff
- eclipse Version: 3.3.0 Build id: I20070625-1500
- mylyn 2.0.0.v20070627-140

I add a Trac repository, click on "New Query". All but Status have correct values, Status is empty. Updating the attributes does not help.
Comment 13 Steffen Pingel CLA 2007-09-10 21:29:04 EDT
Rainer, please try the new snapshot that was uploaded to the dev bulid site (requires the current trunk of the XML-RPC plug-in):

 http://www.eclipse.org/mylyn/downloads/builds.php
Comment 14 Rainer Sokoll CLA 2007-09-11 04:13:30 EDT
Steffen,
the status field now is filled with the correct values :-)
But a new problem occured:
I'm on Solaris and I get an SWT error when clicking on a task:

Unhandled event loop
No more handles [Unsupported platform]

Windows seems to be OK
If you need more information, please ask.
Comment 15 Mik Kersten CLA 2007-09-11 12:50:05 EDT
Please see if the following resolves your "no more handles" error: http://wiki.eclipse.org/index.php/Mylyn_User_Guide#Browser_Issues 
Comment 16 Steffen Pingel CLA 2007-09-11 13:01:19 EDT
This could be caused by the HTML preview that was recently added to the Trac editor. Which version of Mylyn were you using before upgrading to the dev build?

Mik, maybe we should try to instanciate the browser widget lazily to avoid break down of the task editor when the widget does not work?
Comment 17 Rainer Sokoll CLA 2007-09-12 03:17:34 EDT
The version I used before the SWT problems was mylyn 2.0.0.v20070627-140.
The steps described in http://wiki.eclipse.org/index.php/Mylyn_User_Guide#Browser_Issues  are not helpful in my environment
- really I do not need HTML in Mylyn, I want the rich editor
- I use firefox, not mozilla (BTW: mozilla is deprecated)
- If I need to connect to Trac via web, I must use HTTPS

This is a workaround for me:
- install the latest Mylyn (needed for getting status information from trac)
- build the trac queries
- switch back to the old mylyn (the queries still work)

Of course this is unsatisfying, but as long as trac .11 and tracs XLMRPC plugin are marked "under development", I wouldn't pay too much attention on this.
You mylyn developers rely on a stable API.
Comment 18 Mik Kersten CLA 2007-09-12 10:39:57 EDT
Steffen: yup, we should instantiate the browser widget on demand, since it has not been uncommon for UN*X environments to be misconfigured for the embedded browser.
Comment 19 Steffen Pingel CLA 2007-09-12 13:20:04 EDT
Opened bug 203107 for fixing the browser widget in the task editor.
Comment 20 Steffen Pingel CLA 2007-09-20 22:15:33 EDT
Rainer, the latest dev build contains a fix for bug 203107. Please report back if you still get the browser errors when opening the task editor:

 http://www.eclipse.org/mylyn/downloads/builds.php
Comment 21 Rainer Sokoll CLA 2007-09-21 03:12:40 EDT
Steffen,

looks good so far. I'm now on Mylyn 2.0.1.v20070920-1000.
I do not get SWT errors anymore - until I click on the Preview Button, but the upcoming SWT error is expected :-)
Comment 22 Brendon CLA 2008-02-08 13:26:31 EST
Currently using trac 11b and mylyn 2.3 20080207-1500 and so far things are working okay, except for the actions.
It does not recognize when i've accepted a  ticket, and the accept option is still there.
Comment 23 Steffen Pingel CLA 2008-06-24 03:23:23 EDT
The interest in full Mylyn support for Trac 0.11 has increased with the recent release of the final version. Currently the Mylyn team does not have sufficient resources to provide an implementation but we would be happy to support a contribution. The most requested feature is support for Trac's configurable workflow (bug 223173) which may require enhancing the XmlRpcPlugin to provide additional information about workflows and little work on the Mylyn side.

Please comment here if you are interested in contributing an implementation and tests to resolve this bug.
Comment 24 Daniel Serodio CLA 2008-06-24 12:10:14 EDT
(In reply to comment #23)
> The interest in full Mylyn support for Trac 0.11 has increased with the recent
> release of the final version. Currently the Mylyn team does not have sufficient
> resources to provide an implementation but we would be happy to support a
> contribution. The most requested feature is support for Trac's configurable
> workflow (bug 223173) which may require enhancing the XmlRpcPlugin to provide
> additional information about workflows and little work on the Mylyn side.
> 
> Please comment here if you are interested in contributing an implementation and
> tests to resolve this bug.
> 

Count me in for testing
Comment 25 Daniel Adrian CLA 2008-06-24 13:13:56 EDT
I would be more then welcome to contribute, implementation for mylyn and/or test.
My knowledge of python is somewhat limited at the moment, so I probably will not touch the xmlrpc plugin.

Just need some guidance on setting up an environment, etc...
Comment 26 Steffen Pingel CLA 2008-06-24 15:53:14 EDT
The Mylyn wiki has some pointers how to check out the source for Mylyn:

 http://wiki.eclipse.org/Mylyn_Contributor_Reference#Setup
 
To get started you could setup a workspace with the current Mylyn sources and setup a Trac 0.11 test repository with a custom workflow. The relevant code that makes actions appear in the task editor is in TracTaskDataHandler.addOperation(). If you set a break point there and then refresh a trac task you should be able to get an idea how the code works.
Comment 27 Chris CLA 2008-06-26 14:34:44 EDT
I too can assist in testing updates around the custom workflows.
Comment 28 Daniel Adrian CLA 2008-06-28 15:56:38 EDT
Requested needed support from the xmlrpc plugin:
http://trac-hacks.org/ticket/3110
Comment 29 Daniel Adrian CLA 2008-06-28 17:09:10 EDT
I think to fully support custom workflows (Other than the default ones and FFU) the user should be given some kind of generic action editor, so they can decide how to handle actions without having to wait for an implementation. More complex action operations could be handled by plugins for the Trac connector.


Comment 30 Steffen Pingel CLA 2008-06-28 18:19:16 EDT
As far as I understand the custom workflow support for Trac it is all configured in the repository side. I am not sure that it makes sense to duplicate this configuration on the client side. It could easily get out of sync with the repository and would also put significant burden on users when a new Trac repository is added in Mylyn. My sense is that it would require less effort to create a patch for the TracXmlRpcPlugin that adds the required remote calls. Users interested in 0.11 support could easily apply this patch when building the plugin and wouldn't have to wait until it is accepted upstream.
Comment 31 Daniel Adrian CLA 2008-06-29 10:45:04 EDT
There is no duplication here.

The new functions must be added to the xmlrpc plugin.

Part of the custom workflow in trac is that users can define an operation to the action. Because of this mylyn should somehow support this.

This concerns the presentation of an action, custom made operations might requires a textfiled or a comobobox or even a checkbox.

Mylyn cannot add support for all custom made operations out there, so some kind of a configuration should be in place to support it, via an operation editor or a plugin made by the user which will add the configuration needed to support his custom operation.
Comment 32 Steffen Pingel CLA 2008-06-29 13:52:45 EDT
Thanks for clarifying. The Mylyn task editor currently supports associating one attribute with an action, e.g. setting the resolution when closing a bug or the owner when reassigning. The attribute can be of any type supported by Mylyn (single selection, text, boolean, integer...). It sounds perfectly right to focus on the cases that are most common and directly supported by Trac and worry about supporting custom configurations later.
Comment 33 Steffen Pingel CLA 2009-05-08 13:04:19 EDT
*** Bug 275451 has been marked as a duplicate of this bug. ***
Comment 34 Anton Danilchenko CLA 2009-05-08 15:29:13 EDT
Waiting to apply this addon.
Comment 35 Steffen Pingel CLA 2009-06-13 22:41:53 EDT
The latest trunk of the XmlRpcPlugin now has support for customized workflows: http://trac-hacks.org/ticket/1075 . A new weekly build of Mylyn is available that takes advantage of the improved XmlRpcPlugin if rev. 6045 or later of the XmlRpcPlugin is installed: http://trac-hacks.org/wiki/XmlRpcPlugin#Installation

If you are running Trac 0.11 please update the XmlRpcPlugin to the latest and install the most recent Mylyn weekly build from these update sites:

 http://download.eclipse.org/tools/mylyn/update/weekly/e3.4/
 http://download.eclipse.org/tools/mylyn/update/weekly/extras/
 
Please file new bugs if you encounter any problems. Any help with testing is greatly appreciated and will help to stabilize Trac 0.11 support before the next release on June 24th!


 
Comment 36 Uno LEE CLA 2009-06-21 11:17:38 EDT
I'm testing last version with trac 0.11

- 3.2.0.v20090617-0100-e3
- eclipse Version: 3.4.2 Build id: M20090211-1700 in Mac
- Changeset  6067 for  xmlrpcplugin


I found an error. 
Even I log in as authenticated ID & Password, I can't update information and create ticket... if I didn't give permission to anonymous.

Fail 'Update Attributes From Repository' using authenticated perm

Only it works when anonymous has permission of TICKET_CREATE, TICKET_VIEW, XML_RPC

I can't set permission only to authenticated ID.

Comment 37 Uno LEE CLA 2009-06-21 11:28:38 EDT
(In reply to comment #36)

Here is more detail for #36

I can see below message when I try 'Update Attributes From Repository' using authenticated perm.
 'TICKET_VIEW privileges are required to perform this operation' while executing 'ticket.component.getAll()'

I log in as authenticated ID & Password, and if I didn't give permission TICKET_CREATE, TICKET_VIEW to anonymous 

Comment 38 Steffen Pingel CLA 2009-06-21 16:30:53 EDT
Uno, please file a new bug and include details about the type of authentication used and Trac version.