Forum

any modification ar...
 
Notifications
Clear all

any modification are available on specific project

5 Posts
2 Users
0 Reactions
3,324 Views
(@pipobru)
Posts: 180
Active Member
Topic starter
 
[#4307]

After 6.2.2 migration on a specific project i have this log and any record are possible:

2017-04-27 13:38:43.612 ** ERROR ** [V6.2.2] Exception-[42703] SQLSTATE[42703]: Undefined column: 7 ERROR: column "Project" does not exist
LINE 1: ... from planningelement where (refId=42 and refType="Project")...
^
HINT: Perhaps you meant to reference the column "planningelement.idproject".
2017-04-27 13:38:43.612 ** ERROR ** [V6.2.2] For query : select sum(validatedWork) as sumvalidatedwork, sum(assignedWork) as sumassignedwork, sum(realWork) as sumrealwork, sum(leftWork) as sumleftwork, sum(plannedWork) as sumplannedwork, sum(validatedCost) as sumvalidatedcost, sum(assignedCost) as sumassignedcost, sum(realCost) as sumrealcost, sum(leftCost) as sumleftcost, sum(plannedCost) as sumplannedcost, sum(expenseValidatedAmount) as sumexpensevalidatedamount, sum(expenseAssignedAmount) as sumexpenseassignedamount, sum(expenseRealAmount) as sumexpenserealamount, sum(expenseLeftAmount) as sumexpenseleftamount, sum(expensePlannedAmount) as sumexpenseplannedamount, sum(reserveAmount) as sumreserveamount, sum(totalValidatedCost) as sumtotalvalidatedcost, sum(totalAssignedCost) as sumtotalassignedcost, sum(totalRealCost) as sumtotalrealcost, sum(totalLeftCost) as sumtotalleftcost, sum(totalPlannedCost) as sumtotalplannedcost from planningelement where (refId=42 and refType="Project") and (
(idle=1 and
(
(isnull(realStartDate) and isnull(realEndDate)) or
(isnull(realStartDate) and year(realEndDate)=0) OR
(isnull(realEndDate)) OR
(year(realStartDate)=0 or year(realEndDate)=0)
)
) or
(idle=0 and
(
(isnull(validatedStartDate) and isnull(validatedEndDate)) or
(isnull(validatedStartDate) and year(validatedEndDate)=0) OR
(isnull(validatedEndDate)) OR
(year(validatedStartDate)=0 or year(validatedEndDate)=0)
)
)
)
2017-04-27 13:38:43.612 ** ERROR ** [V6.2.2] Strack trace :
2017-04-27 13:38:43.612 ** ERROR ** [V6.2.2] #0 Sql->query called at [/var/www/html/model/persistence/SqlElement.php:2063]
2017-04-27 13:38:43.612 ** ERROR ** [V6.2.2] #1 SqlElement->sumSqlElementsFromCriteria called at [/var/www/html/model/OrganizationMain.php:991]
2017-04-27 13:38:43.612 ** ERROR ** [V6.2.2] #2 OrganizationMain->updateSynthesis called at [/var/www/html/model/ProjectPlanningElementMain.php:199]
2017-04-27 13:38:43.612 ** ERROR ** [V6.2.2] #3 ProjectPlanningElementMain->save called at [/var/www/html/model/persistence/SqlElement.php:1227]
2017-04-27 13:38:43.612 ** ERROR ** [V6.2.2] #4 SqlElement->saveDependantObjects called at [/var/www/html/model/persistence/SqlElement.php:1168]
2017-04-27 13:38:43.612 ** ERROR ** [V6.2.2] #5 SqlElement->updateSqlElement called at [/var/www/html/model/persistence/SqlElement.php:704]
2017-04-27 13:38:43.612 ** ERROR ** [V6.2.2] #6 SqlElement->saveSqlElement called at [/var/www/html/model/persistence/SqlElement.php:542]
2017-04-27 13:38:43.612 ** ERROR ** [V6.2.2] #7 SqlElement->save called at [/var/www/html/model/ProjectMain.php:662]
2017-04-27 13:38:43.612 ** ERROR ** [V6.2.2] #8 ProjectMain->save called at [/var/www/html/tool/saveObject.php:78]
2017-04-27 13:38:43.612 ** ERROR ** [V6.2.2] Exception-[25P02] SQLSTATE[25P02]: In failed sql transaction: 7 ERROR: current transaction is aborted, commands ignored until end of transaction block
2017-04-27 13:38:43.613 ** ERROR ** [V6.2.2] For query : select sum(work) as sumwork, sum(cost) as sumcost from work where yearquery called at [/var/www/html/model/persistence/SqlElement.php:2063]
2017-04-27 13:38:43.613 ** ERROR ** [V6.2.2] #1 SqlElement->sumSqlElementsFromCriteria called at [/var/www/html/model/OrganizationMain.php:1030]
2017-04-27 13:38:43.613 ** ERROR ** [V6.2.2] #2 OrganizationMain->updateSynthesis called at [/var/www/html/model/ProjectPlanningElementMain.php:199]
2017-04-27 13:38:43.613 ** ERROR ** [V6.2.2] #3 ProjectPlanningElementMain->save called at [/var/www/html/model/persistence/SqlElement.php:1227]
2017-04-27 13:38:43.613 ** ERROR ** [V6.2.2] #4 SqlElement->saveDependantObjects called at [/var/www/html/model/persistence/SqlElement.php:1168]
2017-04-27 13:38:43.613 ** ERROR ** [V6.2.2] #5 SqlElement->updateSqlElement called at [/var/www/html/model/persistence/SqlElement.php:704]
2017-04-27 13:38:43.613 ** ERROR ** [V6.2.2] #6 SqlElement->saveSqlElement called at [/var/www/html/model/persistence/SqlElement.php:542]
2017-04-27 13:38:43.613 ** ERROR ** [V6.2.2] #7 SqlElement->save called at [/var/www/html/model/ProjectMain.php:662]
2017-04-27 13:38:43.613 ** ERROR ** [V6.2.2] #8 ProjectMain->save called at [/var/www/html/tool/saveObject.php:78]
2017-04-27 13:38:43.613 ** ERROR ** [V6.2.2] Exception-[25P02] SQLSTATE[25P02]: In failed sql transaction: 7 ERROR: current transaction is aborted, commands ignored until end of transaction block
2017-04-27 13:38:43.613 ** ERROR ** [V6.2.2] For query : select * from expensedetail where expensedetail.idExpense is null order by expenseDate
2017-04-27 13:38:43.613 ** ERROR ** [V6.2.2] Strack trace :
2017-04-27 13:38:43.613 ** ERROR ** [V6.2.2] #0 Sql->query called at [/var/www/html/model/persistence/SqlElement.php:1943]
2017-04-27 13:38:43.613 ** ERROR ** [V6.2.2] #1 SqlElement->getSqlElementsFromCriteria called at [/var/www/html/model/Expense.php:220]
2017-04-27 13:38:43.613 ** ERROR ** [V6.2.2] #2 Expense->getExpenseDetail called at [/var/www/html/model/Expense.php:92]
2017-04-27 13:38:43.613 ** ERROR ** [V6.2.2] #3 Expense->__construct called at [/var/www/html/model/OrganizationMain.php:1036]
2017-04-27 13:38:43.613 ** ERROR ** [V6.2.2] #4 OrganizationMain->updateSynthesis called at [/var/www/html/model/ProjectPlanningElementMain.php:199]
2017-04-27 13:38:43.613 ** ERROR ** [V6.2.2] #5 ProjectPlanningElementMain->save called at [/var/www/html/model/persistence/SqlElement.php:1227]
2017-04-27 13:38:43.613 ** ERROR ** [V6.2.2] #6 SqlElement->saveDependantObjects called at [/var/www/html/model/persistence/SqlElement.php:1168]
2017-04-27 13:38:43.613 ** ERROR ** [V6.2.2] #7 SqlElement->updateSqlElement called at [/var/www/html/model/persistence/SqlElement.php:704]
2017-04-27 13:38:43.613 ** ERROR ** [V6.2.2] #8 SqlElement->saveSqlElement called at [/var/www/html/model/persistence/SqlElement.php:542]
2017-04-27 13:38:43.613 ** ERROR ** [V6.2.2] #9 SqlElement->save called at [/var/www/html/model/ProjectMain.php:662]
2017-04-27 13:38:43.613 ** ERROR ** [V6.2.2] #10 ProjectMain->save called at [/var/www/html/tool/saveObject.php:78]
2017-04-27 13:38:43.614 ** ERROR ** [V6.2.2] Exception-[25P02] SQLSTATE[25P02]: In failed sql transaction: 7 ERROR: current transaction is aborted, commands ignored until end of transaction block
2017-04-27 13:38:43.614 ** ERROR ** [V6.2.2] For query : select * from expensedetail where expensedetail.idExpense is null order by expenseDate
2017-04-27 13:38:43.614 ** ERROR ** [V6.2.2] Strack trace :
2017-04-27 13:38:43.614 ** ERROR ** [V6.2.2] #0 Sql->query called at [/var/www/html/model/persistence/SqlElement.php:1943]
2017-04-27 13:38:43.614 ** ERROR ** [V6.2.2] #1 SqlElement->getSqlElementsFromCriteria called at [/var/www/html/model/Expense.php:220]
2017-04-27 13:38:43.614 ** ERROR ** [V6.2.2] #2 Expense->getExpenseDetail called at [/var/www/html/model/Expense.php:92]
2017-04-27 13:38:43.614 ** ERROR ** [V6.2.2] #3 Expense->__construct called at [/var/www/html/model/persistence/SqlElement.php:2040]
2017-04-27 13:38:43.614 ** ERROR ** [V6.2.2] #4 SqlElement->sumSqlElementsFromCriteria called at [/var/www/html/model/OrganizationMain.php:1038]
2017-04-27 13:38:43.614 ** ERROR ** [V6.2.2] #5 OrganizationMain->updateSynthesis called at [/var/www/html/model/ProjectPlanningElementMain.php:199]
2017-04-27 13:38:43.614 ** ERROR ** [V6.2.2] #6 ProjectPlanningElementMain->save called at [/var/www/html/model/persistence/SqlElement.php:1227]
2017-04-27 13:38:43.614 ** ERROR ** [V6.2.2] #7 SqlElement->saveDependantObjects called at [/var/www/html/model/persistence/SqlElement.php:1168]
2017-04-27 13:38:43.614 ** ERROR ** [V6.2.2] #8 SqlElement->updateSqlElement called at [/var/www/html/model/persistence/SqlElement.php:704]
2017-04-27 13:38:43.614 ** ERROR ** [V6.2.2] #9 SqlElement->saveSqlElement called at [/var/www/html/model/persistence/SqlElement.php:542]
2017-04-27 13:38:43.614 ** ERROR ** [V6.2.2] #10 SqlElement->save called at [/var/www/html/model/ProjectMain.php:662]
2017-04-27 13:38:43.614 ** ERROR ** [V6.2.2] #11 ProjectMain->save called at [/var/www/html/tool/saveObject.php:78]
2017-04-27 13:38:43.614 ** ERROR ** [V6.2.2] Exception-[25P02] SQLSTATE[25P02]: In failed sql transaction: 7 ERROR: current transaction is aborted, commands ignored until end of transaction block
2017-04-27 13:38:43.614 ** ERROR ** [V6.2.2] For query : select sum(plannedAmount) as sumplannedamount, sum(realAmount) as sumrealamount from expense where yearquery called at [/var/www/html/model/persistence/SqlElement.php:2063]
2017-04-27 13:38:43.614 ** ERROR ** [V6.2.2] #1 SqlElement->sumSqlElementsFromCriteria called at [/var/www/html/model/OrganizationMain.php:1038]
2017-04-27 13:38:43.614 ** ERROR ** [V6.2.2] #2 OrganizationMain->updateSynthesis called at [/var/www/html/model/ProjectPlanningElementMain.php:199]
2017-04-27 13:38:43.614 ** ERROR ** [V6.2.2] #3 ProjectPlanningElementMain->save called at [/var/www/html/model/persistence/SqlElement.php:1227]
2017-04-27 13:38:43.614 ** ERROR ** [V6.2.2] #4 SqlElement->saveDependantObjects called at [/var/www/html/model/persistence/SqlElement.php:1168]
2017-04-27 13:38:43.614 ** ERROR ** [V6.2.2] #5 SqlElement->updateSqlElement called at [/var/www/html/model/persistence/SqlElement.php:704]
2017-04-27 13:38:43.614 ** ERROR ** [V6.2.2] #6 SqlElement->saveSqlElement called at [/var/www/html/model/persistence/SqlElement.php:542]
2017-04-27 13:38:43.614 ** ERROR ** [V6.2.2] #7 SqlElement->save called at [/var/www/html/model/ProjectMain.php:662]
2017-04-27 13:38:43.614 ** ERROR ** [V6.2.2] #8 ProjectMain->save called at [/var/www/html/tool/saveObject.php:78]
2017-04-27 13:38:43.614 ** ERROR ** [V6.2.2] Exception-[25P02] SQLSTATE[25P02]: In failed sql transaction: 7 ERROR: current transaction is aborted, commands ignored until end of transaction block
2017-04-27 13:38:43.614 ** ERROR ** [V6.2.2] For query : select * from project where id=42
2017-04-27 13:38:43.614 ** ERROR ** [V6.2.2] Strack trace :
2017-04-27 13:38:43.615 ** ERROR ** [V6.2.2] #0 Sql->query called at [/var/www/html/model/persistence/SqlElement.php:2260]
2017-04-27 13:38:43.615 ** ERROR ** [V6.2.2] #1 SqlElement->getSqlElement called at [/var/www/html/model/persistence/SqlElement.php:513]
2017-04-27 13:38:43.615 ** ERROR ** [V6.2.2] #2 SqlElement->__construct called at [/var/www/html/model/ProjectMain.php:165]
2017-04-27 13:38:43.615 ** ERROR ** [V6.2.2] #3 ProjectMain->__construct called at [/var/www/html/model/Project.php:39]
2017-04-27 13:38:43.615 ** ERROR ** [V6.2.2] #4 Project->__construct called at [/var/www/html/model/OrganizationMain.php:1045]
2017-04-27 13:38:43.615 ** ERROR ** [V6.2.2] #5 OrganizationMain->updateSynthesis called at [/var/www/html/model/ProjectPlanningElementMain.php:199]
2017-04-27 13:38:43.615 ** ERROR ** [V6.2.2] #6 ProjectPlanningElementMain->save called at [/var/www/html/model/persistence/SqlElement.php:1227]
2017-04-27 13:38:43.615 ** ERROR ** [V6.2.2] #7 SqlElement->saveDependantObjects called at [/var/www/html/model/persistence/SqlElement.php:1168]
2017-04-27 13:38:43.615 ** ERROR ** [V6.2.2] #8 SqlElement->updateSqlElement called at [/var/www/html/model/persistence/SqlElement.php:704]
2017-04-27 13:38:43.615 ** ERROR ** [V6.2.2] #9 SqlElement->saveSqlElement called at [/var/www/html/model/persistence/SqlElement.php:542]
2017-04-27 13:38:43.615 ** ERROR ** [V6.2.2] #10 SqlElement->save called at [/var/www/html/model/ProjectMain.php:662]
2017-04-27 13:38:43.615 ** ERROR ** [V6.2.2] #11 ProjectMain->save called at [/var/www/html/tool/saveObject.php:78]
2017-04-27 13:38:43.615 ** ERROR ** [V6.2.2] ERROR **
2017-04-27 13:38:43.615
** ERROR ** [V6.2.2] on file '/var/www/html/model/persistence/SqlElement.php' at line (2320)
2017-04-27 13:38:43.615
** ERROR ** [V6.2.2] cause = array_key_exists() expects parameter 2 to be array, boolean given
2017-04-27 13:38:43.615
** ERROR ** [V6.2.2] ERROR **
2017-04-27 13:38:43.615 ** ERROR ** [V6.2.2] on file '/var/www/html/model/persistence/SqlElement.php' at line (2322)
2017-04-27 13:38:43.615 ** ERROR ** [V6.2.2] cause = array_key_exists() expects parameter 2 to be array, boolean given
2017-04-27 13:38:43.615 ** ERROR ** [V6.2.2] Error on SqlElement to get 'id' for Class 'Project' : field 'id' not found in Database.
2017-04-27 13:38:43.615 ** ERROR ** [V6.2.2] ERROR **
2017-04-27 13:38:43.615
** ERROR ** [V6.2.2] on file '/var/www/html/model/persistence/SqlElement.php' at line (2320)
2017-04-27 13:38:43.615
** ERROR ** [V6.2.2] cause = array_key_exists() expects parameter 2 to be array, boolean given
2017-04-27 13:38:43.615
** ERROR ** [V6.2.2] ERROR **
2017-04-27 13:38:43.615 ** ERROR ** [V6.2.2] on file '/var/www/html/model/persistence/SqlElement.php' at line (2322)
2017-04-27 13:38:43.615 ** ERROR ** [V6.2.2] cause = array_key_exists() expects parameter 2 to be array, boolean given
2017-04-27 13:38:43.615 ** ERROR ** [V6.2.2] Error on SqlElement to get 'name' for Class 'Project' : field 'name' not found in Database.
2017-04-27 13:38:43.615 ** ERROR ** [V6.2.2] ERROR **
2017-04-27 13:38:43.615
** ERROR ** [V6.2.2] on file '/var/www/html/model/persistence/SqlElement.php' at line (2320)
2017-04-27 13:38:43.615
** ERROR ** [V6.2.2] cause = array_key_exists() expects parameter 2 to be array, boolean given
2017-04-27 13:38:43.615
** ERROR ** [V6.2.2] ERROR **
2017-04-27 13:38:43.615 ** ERROR ** [V6.2.2] on file '/var/www/html/model/persistence/SqlElement.php' at line (2322)
2017-04-27 13:38:43.615 ** ERROR ** [V6.2.2] cause = array_key_exists() expects parameter 2 to be array, boolean given
2017-04-27 13:38:43.615 ** ERROR ** [V6.2.2] Error on SqlElement to get 'idProjectType' for Class 'Project' : field 'idProjectType' not found in Database.
2017-04-27 13:38:43.615 ** ERROR ** [V6.2.2] ERROR **
2017-04-27 13:38:43.615
** ERROR ** [V6.2.2] on file '/var/www/html/model/persistence/SqlElement.php' at line (2320)
2017-04-27 13:38:43.615
** ERROR ** [V6.2.2] cause = array_key_exists() expects parameter 2 to be array, boolean given
2017-04-27 13:38:43.615
** ERROR ** [V6.2.2] ERROR **
2017-04-27 13:38:43.615 ** ERROR ** [V6.2.2] on file '/var/www/html/model/persistence/SqlElement.php' at line (2322)
2017-04-27 13:38:43.615 ** ERROR ** [V6.2.2] cause = array_key_exists() expects parameter 2 to be array, boolean given
2017-04-27 13:38:43.615 ** ERROR ** [V6.2.2] Error on SqlElement to get 'idOrganization' for Class 'Project' : field 'idOrganization' not found in Database.
2017-04-27 13:38:43.615 ** ERROR ** [V6.2.2] ERROR **
2017-04-27 13:38:43.615
** ERROR ** [V6.2.2] on file '/var/www/html/model/persistence/SqlElement.php' at line (2320)
2017-04-27 13:38:43.615
** ERROR ** [V6.2.2] cause = array_key_exists() expects parameter 2 to be array, boolean given
2017-04-27 13:38:43.615
** ERROR ** [V6.2.2] ERROR **
2017-04-27 13:38:43.615 ** ERROR ** [V6.2.2] on file '/var/www/html/model/persistence/SqlElement.php' at line (2322)
2017-04-27 13:38:43.615 ** ERROR ** [V6.2.2] cause = array_key_exists() expects parameter 2 to be array, boolean given
2017-04-27 13:38:43.615 ** ERROR ** [V6.2.2] Error on SqlElement to get 'idCategory' for Class 'Project' : field 'idCategory' not found in Database.
2017-04-27 13:38:43.615 ** ERROR ** [V6.2.2] ERROR **
2017-04-27 13:38:43.615
** ERROR ** [V6.2.2] on file '/var/www/html/model/persistence/SqlElement.php' at line (2320)
2017-04-27 13:38:43.615
** ERROR ** [V6.2.2] cause = array_key_exists() expects parameter 2 to be array, boolean given
2017-04-27 13:38:43.615
** ERROR ** [V6.2.2] ERROR **
2017-04-27 13:38:43.615 ** ERROR ** [V6.2.2] on file '/var/www/html/model/persistence/SqlElement.php' at line (2322)
2017-04-27 13:38:43.615 ** ERROR ** [V6.2.2] cause = array_key_exists() expects parameter 2 to be array, boolean given
2017-04-27 13:38:43.615 ** ERROR ** [V6.2.2] Error on SqlElement to get 'organizationInherited' for Class 'Project' : field 'organizationInherited' not found in Database.
2017-04-27 13:38:43.615 ** ERROR ** [V6.2.2] ERROR **
2017-04-27 13:38:43.615
** ERROR ** [V6.2.2] on file '/var/www/html/model/persistence/SqlElement.php' at line (2320)
2017-04-27 13:38:43.615
** ERROR ** [V6.2.2] cause = array_key_exists() expects parameter 2 to be array, boolean given
2017-04-27 13:38:43.615
** ERROR ** [V6.2.2] ERROR **
2017-04-27 13:38:43.615 ** ERROR ** [V6.2.2] on file '/var/www/html/model/persistence/SqlElement.php' at line (2322)
2017-04-27 13:38:43.615 ** ERROR ** [V6.2.2] cause = array_key_exists() expects parameter 2 to be array, boolean given
2017-04-27 13:38:43.615 ** ERROR ** [V6.2.2] Error on SqlElement to get 'organizationElementary' for Class 'Project' : field 'organizationElementary' not found in Database.
2017-04-27 13:38:43.615 ** ERROR ** [V6.2.2] ERROR **
2017-04-27 13:38:43.615
** ERROR ** [V6.2.2] on file '/var/www/html/model/persistence/SqlElement.php' at line (2320)
2017-04-27 13:38:43.615
** ERROR ** [V6.2.2] cause = array_key_exists() expects parameter 2 to be array, boolean given
2017-04-27 13:38:43.615
** ERROR ** [V6.2.2] ERROR **
2017-04-27 13:38:43.615 ** ERROR ** [V6.2.2] on file '/var/www/html/model/persistence/SqlElement.php' at line (2322)


 
Posted : 27 Apr 2017 17H16
(@babynus)
Posts: 14952
Member Admin
 

Issue Recorded as ticket #2681


 
Posted : 28 Apr 2017 0H45
(@babynus)
Posts: 14952
Member Admin
 

Fix is to replace line 943 in /model/OraganizationMain.php from

            $whereClause='(refId='.$keyPrjOrga.' and refType="Project") and ';

to

            $whereClause='(refId='.$keyPrjOrga.' and refType='Project') and ';

 
Posted : 28 Apr 2017 0H46
(@pipobru)
Posts: 180
Active Member
Topic starter
 

Thanks but is not sufficient. I have apply this other modifications for solve the problem :
//Modification pour ../model/OrganizationMain.php
Ligne 950
$whereClause .= '(
(idle=1 and
(
((realStartDate) is null and (realEndDate) is null) or
((realStartDate) is null and date_part('year', realEndDate) =0) OR
((realEndDate)is null) OR
(date_part('year', realStartDate)=0 or date_part('year', realEndDate)=0)
)
) or
(idle=0 and
(
((validatedStartDate) is null and (validatedEndDate) is null) or
((validatedStartDate) is null and date_part('year', validatedEndDate)=0) OR
((validatedEndDate) is null) OR
(date_part('year', validatedStartDate)=0 or date_part('year', validatedEndDate)=0)
)
)
)';

Ligne 1030
$whereClause = 'year<='.$periodValue.' and idProject='.$keyPrjOrga;

Ligne 1037
$whereClause = 'year<='.$periodValue.' and idProject='.$keyPrjOrga;

Ligne 1050
$whereClause = 'year<='.$periodValue.' and idProject='.$keyPrj;

Ligne 1058
$whereClause = 'year<='.$periodValue.' and idProject='.$keyPrj;


 
Posted : 28 Apr 2017 11H26
(@babynus)
Posts: 14952
Member Admin
 

Not so easy !

1)

$whereClause = 'year<='.$periodValue.' and idProject='.$keyPrjOrga;

=>

$whereClause = 'year<=''.$periodValue.'' and idProject='.$keyPrjOrga;

(quotes were missing)

2)
date_part is not a mySql function.
So your proposal will work on PostgreSql, but not any longer on MySql 🙁

3)
date_part('year', realStartDate)=0
is not the same as
year(realStartDate)=YYYY
when YYYY is replaced by 2017


 
Posted : 28 Apr 2017 21H03
Share:

Scroll to Top