Some ICA-AtoM reported us that information objects being created from an accession are not linked back to its accession. This is only affecting a number of users as explained below.
http://code.google.com/p/qubit-toolkit/issues/detail?id=2344
The problem is in the migration class found in QubitMigrate110.class.php, where some new type of relations are intended to be added to the data set unsuccessfully:
// New type of relations: accession and right
$this->data['QubitTerm']['QubitTerm_accession'] = array(
'id' => '<?php echo QubitTerm::ACCESSION_ID."\n" ?>',
'name' => array('en' => 'Accession'),
'source_culture' => 'en',
'taxonomy_id' => '<?php echo QubitTaxonomy::RELATION_TYPE_ID."\n" ?>');
$this->data['QubitTerm']['QubitTerm_accession'] = array(
'id' => '<?php echo QubitTerm::RIGHT_ID."\n" ?>',
'name' => array('en' => 'Right'),
'source_culture' => 'en',
'taxonomy_id' => '<?php echo QubitTaxonomy::RELATION_TYPE_ID."\n" ?>');
$this->data['QubitTerm']['QubitTerm_accession'] = array(
'id' => '<?php echo QubitTerm::DONOR_ID."\n" ?>',
'name' => array('en' => 'Donor'),
'source_culture' => 'en',
'taxonomy_id' => '<?php echo QubitTaxonomy::RELATION_TYPE_ID."\n" ?>');
Notice that the array key is always the same: 'QubitTerm_accession'. Therefore, only the last item is being introduced in the database during the migration process (see propel:migrate task).
Already fixed in trunk so new users upgrading from older versions won't be affected anymore
But we need to:
-
Make sure in the next migration script (1.3) that these two missing types of relation are added in case they can't be found.
-
Create an extra fix that users can run in their 1.2 installations to add these two missing relation types, that we will use for hosting clients too.
-
Update hosting clients.
-
Share the fix on ica-atom-users.
The testing phase should also cover/try an ICA-AtoM upgraded from older versions. It's not the first time we find a bug here, like the database version update error.