Hi, I need to import support tickets, comments, and users from a Trac installation and Migrate seems like the best way to do it. Does any one know if any work has been done to support Project Issues?
I'll probably end up doing the work myself if there's nothing, so any suggestions on the best example code to look at to get me started would be great too.



frankcarey’s picture

I haven't used the project module, but I'm guessing that it's basically a node? The first thing to do is dig into the guts of the project module and find out how to save a project node using code. You can do this without touching migrate module. Once you have a handle on how they do that in their code, then look at any of the integrations in migrate extras to get an idea of how migrate saves objects.

micheleannj’s picture

I've started outlining a new project_issues.migrate.inc file, but I'm a little confused as to whether I'll have to deal with users & comments in my code, or if I can build on what migrate can already deal with (ie all the basic node stuff, with a couple of extra Project Issue-specific fields).
I appreciate you're help while I try and wrap my head around this!

frankcarey’s picture

Yeah, I wouldn't try to reinvent the wheel. I assume that Project Issues doesn't use CCK fields, so then you would just need to add the fields to the node.

see http://drupal.org/files/issues/459236_nostylefixes.patch as an example. Because nodes are already a migrate type, all you should have to do is to add the fields using a couple hooks in your project_issues.migrate.inc

//add the fields to make them available for mapping. (you can use a switch so that you only adds these fields to a specific node type)
function project_issues_migrate_fields_node(){


//manipulate the fields to make them ready for a node_save() 
function project_issues_migrate_prepare_node() {

mikeryan’s picture

Version: 6.x-1.x-dev » 7.x-2.x-dev
Category: support » feature

Migrate and Migrate Extras V1 are no longer supported, moving request to V2.

mikeryan’s picture

Status: Active » Closed (duplicate)