ProjeQtOr free project management software - save planning reference - ProjeQtOr
 

save planning reference

More
29 Aoû 2019 14:04 #1 by pipobru
Hello, on last version (8.1.5) when i would save planning reference i have this sql error:

2019-08-29 13:41:55.798 ***** ERROR ***** [V8.1.5] Exception-[42703] SQLSTATE[42703]: Undefined column: 7 ERROR: column "surbooked" does not exist
LINE 2: SELECT surbooked, surbookedWork, idResource, idProject, refT...
^
HINT: There is a column named "surbooked" in table "plannedworkbaseline", but it cannot be referenced from this part of the query.
2019-08-29 13:41:55.798 ***** ERROR ***** [V8.1.5] For query : INSERT INTO plannedworkbaseline (surbooked, surbookedWork, idResource, idProject, refType, refId, idAssignment, work, workDate, day, week, month, year, dailyCost, cost, idBaseline, isRealWork)
SELECT surbooked, surbookedWork, idResource, idProject, refType, refId, idAssignment, work, workDate, day, week, month, year, dailyCost, cost, 9, 1 FROM work
where idProject in (41, 55)
2019-08-29 13:41:55.798 ***** ERROR ***** [V8.1.5] Strack trace :
2019-08-29 13:41:55.798 ***** ERROR ***** [V8.1.5] #0 Sql->query called at [/var/www/html/model/persistence/SqlDirectElement.php:83]
2019-08-29 13:41:55.798 ***** ERROR ***** [V8.1.5] #1 SqlDirectElement->execute called at [/var/www/html/model/Baseline.php:122]
2019-08-29 13:41:55.798 ***** ERROR ***** [V8.1.5] #2 Baseline->copyItem called at [/var/www/html/model/Baseline.php:77]
2019-08-29 13:41:55.798 ***** ERROR ***** [V8.1.5] #3 Baseline->saveWithPlanning called at [/var/www/html/tool/savePlanningBaseline.php:64]
2019-08-29 13:44:24.046 ***** ERROR ***** [V8.1.5] Exception-[42703] SQLSTATE[42703]: Undefined column: 7 ERROR: column "surbooked" does not exist
LINE 2: SELECT surbooked, surbookedWork, idResource, idProject, refT...

My databe is postgresql

VEry thanks for your answer

Please Connexion or Create an account to join the conversation.

More
04 Sep 2019 18:27 #2 by babynus
Replied by babynus on topic save planning reference
Hi,

Issue confirmed...
..and fixed.

Fix is to replace in Baline.php lines 116+ from
    if ($itemFrom=='PlannedWork') { // Also include existing real work
      $objFrom=new Work();
      $tableFrom=$objFrom->getDatabaseTableName();
      $colListWork=str_replace(array('surbookedWork','surbooked'), array('0','0'), $colList);
      $query="INSERT INTO $tableTo ($colList idBaseline, isRealWork)\n"
      ."SELECT $colListWork $idBaseline, 1 FROM $tableFrom \n"
      ." where idProject in ".transformListIntoInClause($proj->getRecursiveSubProjectsFlatList(true, true));
      $res=SqlDirectElement::execute($query);
    }
to
    if ($itemFrom=='PlannedWork') { // Also include existing real work
      $objFrom=new Work();
      $tableFrom=$objFrom->getDatabaseTableName();
      $colListWork=str_replace(array('surbookedWork','surbooked'), array('0','0'), $colList);
      $query="INSERT INTO $tableTo ($colList idBaseline, isRealWork)\n"
      ."SELECT $colListWork $idBaseline, 1 FROM $tableFrom \n"
      ." where idProject in ".transformListIntoInClause($proj->getRecursiveSubProjectsFlatList(true, true));
      $res=SqlDirectElement::execute($query);
    }

Fix will be included in patch V8.1.6

Babynus
Administrator of ProjeQtOr web site

Please Connexion or Create an account to join the conversation.

Moderators: babynusprotion
Time to create page: 0.075 seconds