View ProjeQtOr On SourceForge.net
ProjeQtOr - Project Management Tool
Supportez nous sur Capterra
OIN - Open Invention Network
ProjeQtOr free project management software - API Bug in function jsonDumpObj - 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)

 

 

 
 

API Bug in function jsonDumpObj

More
28 Aoû 2014 17:29 #1 by mamath
Hi,

I use the API for getting information from ProjeQtOr, and if i try too retrieve information from object "Assignment", an error is log in projeQtOr log :

2014-08-28 17:18:18 ***** ERROR ***** Exception-[42S22] SQLSTATE[42S22]: Column not found: 1054 Unknown column 'name' in 'field list'
2014-08-28 17:18:18 ***** ERROR ***** For query : select id as id, name as name from l_assignment where (1=1 ) order by l_assignment.name
2014-08-28 17:18:18 ***** ERROR ***** Strack trace :
2014-08-28 17:18:18 ***** ERROR ***** #0 Sql->query called at [D:\www\peps_dev_web\model\persistence\SqlList.php:93]
2014-08-28 17:18:18 ***** ERROR ***** #1 SqlList->fetchList called at [D:\www\peps_dev_web\model\persistence\SqlList.php:45]
2014-08-28 17:18:18 ***** ERROR ***** #2 SqlList->getListNotTranslated called at [D:\www\peps_dev_web\model\persistence\SqlList.php:222]
2014-08-28 17:18:18 ***** ERROR ***** #3 SqlList->getFieldFromId called at [D:\www\peps_dev_web\model\persistence\SqlList.php:214]
2014-08-28 17:18:18 ***** ERROR ***** #4 SqlList->getNameFromId called at [D:\www\peps_dev_web\api\index.php:291]
2014-08-28 17:18:18 ***** ERROR ***** #5 jsonDumpObj called at [D:\www\peps_dev_web\api\index.php:176


The bug is not blocking at all because the Assignment object good, and i have found the origin :
too correct just change the following line in
function jsonDumpObj($obj, $included=false)
of api/index.php

Change :
if (strtoupper(substr($idclass,0,1))==substr($idclass,0,1)) {
		  		$res.=", ";
		  		$res.='"name' . $idclass . '":"' . htmlEncodeJson(SqlList::getNameFromId($idclass, $val)) . '"';
		  	}

to
if (strtoupper(substr($idclass,0,1))==substr($idclass,0,1) && 
				property_exists($idclass, 'name') ) {
		  		$res.=", ";
		  		$res.='"name' . $idclass . '":"' . htmlEncodeJson(SqlList::getNameFromId($idclass, $val)) . '"';
		  	}

Bye

Please Connexion or Create an account to join the conversation.

More
28 Aoû 2014 19:33 #2 by babynus
Thanks for reporting the issue of providing the fix.

Will be included in next version.

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.