Fog Creek Software
Discussion Board

Combining three projects into one.

We're using FogBugz to track defects in three projects which are going to be combined into one product.  Two of the projects have their own instances of FogBugz and the third is a project within a third instance of the tool.

Each of the three instances of the application have users who may or may not be users of one or both of the other instances.

What I want to do is to be able to combine the three databases into one to give an overall view of the total defects across the new combined product.

I'm fairly happy about giving each entry in the Bugs table a unique (as in unique across the three) identity, and the same with the BugEvent table, the users, the projects, areas and so on, and the mapping between entities.

What I can't work out is how to combine the various attachments that have been added to the various databases over time.  Because these are stored as pointers and not in the database itself, is there anyway of doing this?

Does Fog Creek offer any service for doing this?

Friday, January 16, 2004

Basically your only problem is foreign keys...

In most tables there is a field called ixTableName (if it is part of TableName, it is a primary key... if it is part of a different table, it is a foreign key into TableName).

The files stored on disk are stored in folders numbered after the primary ixBugEvent key from the event that they were added in.

When you combine databases you will be changing primary keys.. this will mean that you will need to also update all foreign keys.  If you set up relationships in the database to say "this is a foreign key of that", most dbs will do the work for you (everything but the fileuploads part) when you combine dbs.

To do the fileuploads part, just create a new column in the bugevents table for the 3 dbs.  Call it ixBugEventOld, and copy all the ixBugEvent values over + the name of the db they were in.  Then once the dbs are combined you will still be able to go through the bugevents and know which file attachment is where, and write a script to rename all the fileattachment folders to reflect their new ixBugEvent folder number.

Unfortunately we do not offer a service to do this.

Michael H. Pryor (fogcreek)
Friday, January 16, 2004

Hi Michael

Many thanks, I thought that the attachments would be a showstopper, fortunately this is now not the case.

Saturday, January 17, 2004

Yes, its not a showstopper, but it just takes a little planning and a little code to make it all work correctly.

Michael H. Pryor (fogcreek)
Saturday, January 17, 2004

*  Recent Topics

*  Fog Creek Home