View ProjeQtOr On SourceForge.net
ProjeQtOr - Project Management Tool
Supportez nous sur Capterra
OIN - Open Invention Network
ProjeQtOr free project management software - Fix for indicatorable element - 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)

 

 

 
 

Fix for indicatorable element

More
26 Fév 2018 16:26 #1 by papjul
Good day,

I have the current issue due to adding Client as Indicatorable element (not in ProjeQtOr base, but any element not containing an idProject might cause this crash so the fix may be relevant for you):
2018-02-26 11:17:41.001 ***** ERROR ***** [V6.5.6] ERROR *****
2018-02-26 11:17:41.001 ***** ERROR ***** [V6.5.6] on file '/var/www/prod/model/persistence/SqlElement.php' at line (992)
2018-02-26 11:17:41.001 ***** ERROR ***** [V6.5.6] cause = Undefined property: Client::$idProject

Here is the fix in SQLElement.php:992:
if(property_exists($this, 'idProject')) {
			$crit = array('nameIndicatorable' => get_class ( $this ), 'idle' => '0','idProject' => $this->idProject);
		} else {
			$crit = array('nameIndicatorable' => get_class ( $this ), 'idle' => '0');
		}

Not adding this fix will crash on saving if an indicator exists (closed or not) for an element with no project field (in my case, it was on Client).

I also noticed that on an indicator of type Project, the code above actually get the "is sub project of" (idProject) field instead of the id of the project (id), not sure if this is what is expected?

Thanks in advance,

Please Connexion or Create an account to join the conversation.

More
26 Fév 2018 16:43 - 26 Fév 2018 16:43 #2 by babynus
Thanks for submitting the issue and the fix.

The fix, adapted to take into account Project objects, will be included in V7.0.0.
if(property_exists($this, 'idProject')) {
          $idP=(get_class($this)=='Project')?$this->id:$this->idProject;
          $crit = array('nameIndicatorable' => get_class ( $this ), 'idle' => '0','idProject' => $idP );
        } else {
          $crit = array('nameIndicatorable' => get_class ( $this ), 'idle' => '0');
        }

Babynus
Administrator of ProjeQtOr web site
Last edit: 26 Fév 2018 16:43 by babynus.

Please Connexion or Create an account to join the conversation.

Moderators: babynusprotion
Time to create page: 0.036 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.