Forum

Welcome to ProjeQtOr new Forum. We migrated old forum to the new website.
You will find all your posts here, with your usual account.
Just one point : you’ll have to reinitialize your password. Use “Lost password” feature.

[SOLVED] save plann...
 
Notifications
Clear all

[SOLVED] save planning reference (on 8.2.1)

4 Posts
2 Users
0 Reactions
2,920 Views
(@pipobru)
Posts: 180
Active Member
Topic starter
 
[#6221]

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


 
Posted : 29 Aug 2019 16H04
(@babynus)
Posts: 14952
Member Admin
 

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


 
Posted : 04 Sep 2019 20H27
(@pipobru)
Posts: 180
Active Member
Topic starter
 

Hello on the last version, when i would save planning reference i have this trace:

2019-09-24 11:10:51.033 ** ERROR ** [V8.2.1] Exception-[42703] SQLSTATE[42703]: Undefined column: 7 ERROR: column "minimumthreshold" of relation "planningelementbaseline" does not exist
LINE 1: ...lementary, idle, done, cancelled, idPlanningMode, minimumThr...
^
2019-09-24 11:10:51.033 ** ERROR ** [V8.2.1] For query : INSERT INTO planningelementbaseline (idProject, refType, refId, refName, initialStartDate, validatedStartDate, validatedStartFraction, plannedStartDate, plannedStartFraction, realStartDate, initialEndDate, validatedEndDate, validatedEndFraction, plannedEndDate, plannedEndFraction, realEndDate, initialDuration, validatedDuration, plannedDuration, realDuration, initialWork, validatedWork, assignedWork, plannedWork, leftWork, realWork, progress, validatedCost, assignedCost, plannedCost, leftCost, realCost, expectedProgress, wbs, wbsSortable, topId, topRefType, topRefId, priority, elementary, idle, done, cancelled, idPlanningMode, minimumThreshold, indivisibility, idBill, validatedCalculated, validatedExpenseCalculated, latestStartDate, latestEndDate, isOnCriticalPath, notPlannedWork, isManualProgress, surbooked, idBaseline)
SELECT idProject, refType, refId, refName, initialStartDate, validatedStartDate, validatedStartFraction, plannedStartDate, plannedStartFraction, realStartDate, initialEndDate, validatedEndDate, validatedEndFraction, plannedEndDate, plannedEndFraction, realEndDate, initialDuration, validatedDuration, plannedDuration, realDuration, initialWork, validatedWork, assignedWork, plannedWork, leftWork, realWork, progress, validatedCost, assignedCost, plannedCost, leftCost, realCost, expectedProgress, wbs, wbsSortable, topId, topRefType, topRefId, priority, elementary, idle, done, cancelled, idPlanningMode, minimumThreshold, indivisibility, idBill, validatedCalculated, validatedExpenseCalculated, latestStartDate, latestEndDate, isOnCriticalPath, notPlannedWork, isManualProgress, surbooked, 11 FROM planningelement as PlanningElement
where idProject in (56, 59, 60)
2019-09-24 11:10:51.033 ** ERROR ** [V8.2.1] Strack trace :
2019-09-24 11:10:51.033 ** ERROR ** [V8.2.1] #0 Sql->query called at [/var/www/html/model/persistence/SqlDirectElement.php:83]
2019-09-24 11:10:51.033 ** ERROR ** [V8.2.1] #1 SqlDirectElement->execute called at [/var/www/html/model/Baseline.php:115]
2019-09-24 11:10:51.033 ** ERROR ** [V8.2.1] #2 Baseline->copyItem called at [/var/www/html/model/Baseline.php:76]
2019-09-24 11:10:51.033 ** ERROR ** [V8.2.1] #3 Baseline->saveWithPlanning called at [/var/www/html/tool/savePlanningBaseline.php:64]
2019-09-24 11:10:51.034 ** ERROR ** [V8.2.1] Exception-[25P02] SQLSTATE[25P02]: In failed sql transaction: 7 ERROR: current transaction is aborted, commands ignored until end of transaction block
2019-09-24 11:10:51.034 ** ERROR ** [V8.2.1] For query : select * from project where id=56
2019-09-24 11:10:51.034 ** ERROR ** [V8.2.1] Strack trace :
2019-09-24 11:10:51.034 ** ERROR ** [V8.2.1] #0 Sql->query called at [/var/www/html/model/persistence/SqlElement.php:2939]
2019-09-24 11:10:51.034 ** ERROR ** [V8.2.1] #1 SqlElement->getSqlElement called at [/var/www/html/model/persistence/SqlElement.php:672]
2019-09-24 11:10:51.034 ** ERROR ** [V8.2.1] #2 SqlElement->__construct called at [/var/www/html/model/ProjectMain.php:188]
2019-09-24 11:10:51.034 ** ERROR ** [V8.2.1] #3 ProjectMain->__construct called at [/var/www/html/model/Project.php:40]
2019-09-24 11:10:51.034 ** ERROR ** [V8.2.1] #4 Project->__construct called at [/var/www/html/model/Baseline.php:111]
2019-09-24 11:10:51.034 ** ERROR ** [V8.2.1] #5 Baseline->copyItem called at [/var/www/html/model/Baseline.php:77]
2019-09-24 11:10:51.034 ** ERROR ** [V8.2.1] #6 Baseline->saveWithPlanning called at [/var/www/html/tool/savePlanningBaseline.php:64]
2019-09-24 11:10:51.034 ** ERROR ** [V8.2.1] Exception-[25P02] SQLSTATE[25P02]: In failed sql transaction: 7 ERROR: current transaction is aborted, commands ignored until end of transaction block
2019-09-24 11:10:51.034 ** ERROR ** [V8.2.1] For query : select * from project where project.idProject is null and project.idle=0
2019-09-24 11:10:51.034 ** ERROR ** [V8.2.1] Strack trace :
2019-09-24 11:10:51.034 ** ERROR ** [V8.2.1] #0 Sql->query called at [/var/www/html/model/persistence/SqlElement.php:2480]
2019-09-24 11:10:51.034 ** ERROR ** [V8.2.1] #1 SqlElement->getSqlElementsFromCriteria called at [/var/www/html/model/ProjectMain.php:502]
2019-09-24 11:10:51.034 ** ERROR ** [V8.2.1] #2 ProjectMain->getRecursiveSubProjects called at [/var/www/html/model/ProjectMain.php:530]
2019-09-24 11:10:51.034 ** ERROR ** [V8.2.1] #3 ProjectMain->getRecursiveSubProjectsFlatList called at [/var/www/html/model/Baseline.php:114]
2019-09-24 11:10:51.034 ** ERROR ** [V8.2.1] #4 Baseline->copyItem called at [/var/www/html/model/Baseline.php:77]
2019-09-24 11:10:51.034 ** ERROR ** [V8.2.1] #5 Baseline->saveWithPlanning called at [/var/www/html/tool/savePlanningBaseline.php:64]
2019-09-24 11:10:51.034 ** ERROR ** [V8.2.1] Exception-[42601] SQLSTATE[42601]: Syntax error: 7 ERROR: syntax error at or near ")"
LINE 3: where idProject in ()
^
2019-09-24 11:10:51.034 ** ERROR ** [V8.2.1] For query : INSERT INTO plannedworkbaseline (surbooked, surbookedWork, idResource, idProject, refType, refId, idAssignment, work, workDate, day, week, month, year, dailyCost, cost, idBaseline)
SELECT surbooked, surbookedWork, idResource, idProject, refType, refId, idAssignment, work, workDate, day, week, month, year, dailyCost, cost, 11 FROM plannedwork as PlannedWork
where idProject in ()
2019-09-24 11:10:51.034 ** ERROR ** [V8.2.1] Strack trace :
2019-09-24 11:10:51.034 ** ERROR ** [V8.2.1] #0 Sql->query called at [/var/www/html/model/persistence/SqlDirectElement.php:83]
2019-09-24 11:10:51.034 ** ERROR ** [V8.2.1] #1 SqlDirectElement->execute called at [/var/www/html/model/Baseline.php:115]
2019-09-24 11:10:51.034 ** ERROR ** [V8.2.1] #2 Baseline->copyItem called at [/var/www/html/model/Baseline.php:77]
2019-09-24 11:10:51.034 ** ERROR ** [V8.2.1] #3 Baseline->saveWithPlanning called at [/var/www/html/tool/savePlanningBaseline.php:64]
2019-09-24 11:10:51.034 ** ERROR ** [V8.2.1] Exception-[25P02] SQLSTATE[25P02]: In failed sql transaction: 7 ERROR: current transaction is aborted, commands ignored until end of transaction block
2019-09-24 11:10:51.035 ** ERROR ** [V8.2.1] For query : select * from project where project.idProject is null and project.idle=0
2019-09-24 11:10:51.035 ** ERROR ** [V8.2.1] Strack trace :
2019-09-24 11:10:51.035 ** ERROR ** [V8.2.1] #0 Sql->query called at [/var/www/html/model/persistence/SqlElement.php:2480]
2019-09-24 11:10:51.035 ** ERROR ** [V8.2.1] #1 SqlElement->getSqlElementsFromCriteria called at [/var/www/html/model/ProjectMain.php:502]
2019-09-24 11:10:51.035 ** ERROR ** [V8.2.1] #2 ProjectMain->getRecursiveSubProjects called at [/var/www/html/model/ProjectMain.php:530]
2019-09-24 11:10:51.035 ** ERROR ** [V8.2.1] #3 ProjectMain->getRecursiveSubProjectsFlatList called at [/var/www/html/model/Baseline.php:122]
2019-09-24 11:10:51.035 ** ERROR ** [V8.2.1] #4 Baseline->copyItem called at [/var/www/html/model/Baseline.php:77]
2019-09-24 11:10:51.035 ** ERROR ** [V8.2.1] #5 Baseline->saveWithPlanning called at [/var/www/html/tool/savePlanningBaseline.php:64]
2019-09-24 11:10:51.035 ** ERROR ** [V8.2.1] Exception-[42601] SQLSTATE[42601]: Syntax error: 7 ERROR: syntax error at or near ")"

Thanks for your help !


 
Posted : 24 Sep 2019 13H15
(@babynus)
Posts: 14952
Member Admin
 

Issue recorded as Ticket #4224


 
Posted : 26 Sep 2019 14H02
Share:

Scroll to Top