View ProjeQtOr On SourceForge.net
ProjeQtOr - Project Management Tool
Supportez nous sur Capterra
OIN - Open Invention Network
ProjeQtOr free project management software - Problem about Copy project - ProjeQtOr

Prochaines sessions de formation

Les prochaines formations et démonstrations sont ouvertes, inscrivez-vous rapidement !

 

Démonstration de ProjeQtOr

(gratuit, sur inscription)

Mardi 23 avril (10h30-12h)

Jeudi 16 mai (16h-17h30)

Jeudi 13 juin (10h30-12h)

 
 

Planifiez avec ProjeQtOr

3 et 4 avril (9h - 12h30)

 
 

Administrez avec ProjeQtOr

10 et 11 avril (9h - 12h30)

 

 

 
 

Problem about Copy project

More
08 Fév 2012 10:03 #1 by greg35
Hi,

We have found a problem when we copy a project


To reproduce this bug follow the next steps :

- Create a new project with a name project1 and a type template
- Create the activities
- Add a new activity with a name "activitySon" and project name "project1"
- Add a new activty with a name "activityFather" and project name "project1"
- Edit the activity "activitySon" and set activity parent to "activity father"
- Goto projects, select the project1 and click on copy project, for the destination project name set project2

As result on the copy we have,

The activity name "activityFather" is on project2 but the activity "activitySon" is on project1 instead of to have a link to the project2.

Best regards.

Please Connexion or Create an account to join the conversation.

More
08 Fév 2012 16:41 #2 by babynus
Hi,
This issue should be fixed in V2.0.0

If you are using V1.9.1 (or less) I should advise you to migrate to V2.0.0.

If you are using V2.0.0, reply to this post so that I will investigate further.

Thanks.

Babynus
Administrator of ProjeQtOr web site

Please Connexion or Create an account to join the conversation.

More
08 Fév 2012 17:09 #3 by greg35
Hi,

Thanks you for you reply.
I use the 2.0.0 version.

I can send you a partial bug fix (see below).

The problem is on the copyProjectTo.php, currently the activities are iterated on id field.
Parent activity should not be migrated to the new project when the current activity is saved. A validation error is done in save method and the current activity isn't moved to the new project.

To fix the problem, activities must be ordered by wbsSortable field and not by id field. Navigation tree was done from parent activities to sons activities . The parent activities are moved and saved; then sons activities aremoved and saved. No validation errors occured.

Below the svn patch.

The last problem to resolve: sons activities order in the final project are not saved in the same order as parent. The activiy copy (in foreach statement, line 46) is the problem. It was done on an array sorted by id but not by wbs.

Index: copyProjectTo.php
===================================================================
--- copyProjectTo.php    (revision 450)
+++ copyProjectTo.php    (working copy)
@@ -41,12 +41,17 @@
     // Copy activities
   $activity=New Activity();
   $activities=$activity->getSqlElementsFromCriteria($crit, false, null, null, true);
+ 
   foreach ($activities as $activity) {
       $act=new Activity($activity->id);
     $new=$act->copy();
     $actArrayObj[$new->id]=$new;
     $actArray[$activity->id]=$new->id;
   }
+ 
+  // Sort by wbsSortable
+  usort($actArrayObj, "customSortByWbsSortable");
+ 
     foreach ($actArrayObj as $new) {
         //$new=new Activity($new->id);
         //$new->name='Copied ' . $new->name;
@@ -139,4 +144,12 @@
 } else {
   echo '<span class="messageWARNING" >' . $result . '</span>';
 }
+
+function customSortByWbsSortable($a,$b) {
+    if (strlen($a->ActivityPlanningElement->wbsSortable) == strlen($b->ActivityPlanningElement->wbsSortable) ){
+        return $a->ActivityPlanningElement->wbsSortable > $b->ActivityPlanningElement->wbsSortable;
+    }else {
+        return $a->ActivityPlanningElement->wbsSortable < $b->ActivityPlanningElement->wbsSortable;
+    }
+}
 ?>
\ No newline at end of file

Best regards

Please Connexion or Create an account to join the conversation.

More
09 Fév 2012 18:44 #4 by babynus
Thnaks for bug fix (even if partial)
Will be implemented / completed in next patch release.

Babynus
Administrator of ProjeQtOr web site

Please Connexion or Create an account to join the conversation.

More
10 Fév 2012 08:59 #5 by greg35
Thank you for you reply.

Have you open a bug ?
And if yes, can you send me the number to follow the fix.

Regards,

Please Connexion or Create an account to join the conversation.

More
10 Fév 2012 18:25 #6 by babynus
Ticket #560.

Babynus
Administrator of ProjeQtOr web site

Please Connexion or Create an account to join the conversation.

Moderators: babynusprotion
Time to create page: 0.034 seconds

Paramétrages de cookies

×

Cookies fonctionnels

Ce site utilise des cookies pour assurer son bon fonctionnement et ne peuvent pas être désactivés de nos systèmes. Nous ne les utilisons pas à des fins publicitaires. Si ces cookies sont bloqués, certaines parties du site ne pourront pas fonctionner.

Session

Veuillez vous connecter pour voir vos activités!

Autres cookies

Ce site web utilise un certain nombre de cookies pour gérer, par exemple, les sessions utilisateurs.