[evolvis-commits] r13221: Migrate cost estimation and completeness for tasks

mirabilos at evolvis.org mirabilos at evolvis.org
Mon Feb 28 02:23:28 CET 2011


Author: mirabilos
Date: 2011-02-28 02:23:28 +0100 (Mon, 28 Feb 2011)
New Revision: 13221

Modified:
   trunk/gforge_base/evolvisforge-5.1/gforge/contrib/migrate-from-gfas.pl
Log:
Migrate cost estimation and completeness for tasks

Modified: trunk/gforge_base/evolvisforge-5.1/gforge/contrib/migrate-from-gfas.pl
===================================================================
--- trunk/gforge_base/evolvisforge-5.1/gforge/contrib/migrate-from-gfas.pl	2011-02-28 01:23:26 UTC (rev 13220)
+++ trunk/gforge_base/evolvisforge-5.1/gforge/contrib/migrate-from-gfas.pl	2011-02-28 01:23:28 UTC (rev 13221)
@@ -657,7 +657,31 @@
 	$dbhFF->rollback ;
 	die "Rolling back" ;
 } ;
+
+$sthAS = $dbhAS->prepare ("select tefd.field_data, ti.tracker_item_id from tracker_extra_field_data tefd, tracker_extra_field tef, tracker_item ti, tracker t where tefd.tracker_item_id = ti.tracker_item_id and ti.tracker_id = t.tracker_id and t.datatype = 2 and tefd.tracker_extra_field_id = tef.tracker_extra_field_id and field_name = 'Estimated Effort (Hours)'") ;
+$sthFF = $dbhFF->prepare ("update project_task set hours=? where project_task_id=?") ;
+$sthAS->execute ;
+while (@arrayAS = $sthAS->fetchrow_array) {
+    my $hours = $arrayAS[0] ;
+    my $ptid = $arrayAS[1] ;
+    next unless $hours =~ /^[0-9]+$/ ;
+    $sthFF->execute ($hours, $ptid) ;
+}
+$sthAS->finish ;
+$sthFF->finish ;
 		      
+$sthAS = $dbhAS->prepare ("select tefd.field_data, ti.tracker_item_id from tracker_extra_field_data tefd, tracker_extra_field tef, tracker_item ti, tracker t where tefd.tracker_item_id = ti.tracker_item_id and ti.tracker_id = t.tracker_id and t.datatype = 2 and tefd.tracker_extra_field_id = tef.tracker_extra_field_id and field_name = 'Percent Complete (0-100)'") ;
+$sthFF = $dbhFF->prepare ("update project_task set percent_complete=? where project_task_id=?") ;
+$sthAS->execute ;
+while (@arrayAS = $sthAS->fetchrow_array) {
+    my $percent = $arrayAS[0] ;
+    my $ptid = $arrayAS[1] ;
+    next unless $percent =~ /^[0-9]+$/ ;
+    $sthFF->execute ($percent, $ptid) ;
+}
+$sthAS->finish ;
+$sthFF->finish ;
+		      
 $map = {
     'tia.tracker_item_id' => 'project_task_id',
     'tia.assignee' => 'assigned_to_id',



More information about the evolvis-commits mailing list