View ProjeQtOr On SourceForge.net
ProjeQtOr - Project Management Tool
Supportez nous sur Capterra
OIN - Open Invention Network
ProjeQtOr free project management software - Export planning - Division by zero - 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)

 

 

 
 

Export planning - Division by zero

More
31 Mai 2019 12:29 - 31 Mai 2019 12:43 #1 by dieperie
Dears,
During planning export, the following error occurs:

2019-05-31 10:34:30.642 ***** ERROR ***** [V8.0.3] ERROR *****
2019-05-31 10:34:30.643 ***** ERROR ***** [V8.0.3] on file '/usr/share/projeqtor/tool/jsonPlanning.php' at line (1580)
2019-05-31 10:34:30.643 ***** ERROR ***** [V8.0.3] cause = Division by zero


The last lines from the .xml file.
<UID>120</UID>
<TaskUID>120</TaskUID>
<ResourceUID>23</ResourceUID>
<div class="messageERROR" >ERROR : An error occurred on 2019-05-31 at 10:34:30</div><input type="hidden" id="lastSaveId" value="" /><input type="hidden" id="lastOperation" value="ERROR" /><input type="hidden" id="lastOperationStatus" value="ERROR" />

'/usr/share/projeqtor/tool/jsonPlanning.php' at line (1580)
$pct=($ass->plannedWork)?round($ass->realWork/$ass->plannedWork*100,0):0;

Thank you.
Last edit: 31 Mai 2019 12:43 by dieperie.

Please Connexion or Create an account to join the conversation.

More
31 Mai 2019 16:26 #2 by babynus
Very strange !
It seems that you have some assignment with a plannedWork that is not null nor zero, but that gives zero when multiplicated by 100...

Can you please try and ass some debugging line before line 1580 in jsonPlanning.php, this way
debugLog("plannedWork='$ass->plannedWork'"),
$pct=($ass->plannedWork)?round($ass->realWork/$ass->plannedWork*100,0):0;

Then set
$logLevel=3;
in parameters.php and test again.
Post here resulting log file.

Babynus
Administrator of ProjeQtOr web site

Please Connexion or Create an account to join the conversation.

More
01 Jui 2019 10:55 - 01 Jui 2019 10:57 #3 by dieperie
Thank you.

Below the log after these changes:

2019-06-01 10:51:29.604
DEBUG
plannedWork='0'
2019-06-01 10:51:29.604
DEBUG
plannedWork='0'
2019-06-01 10:51:29.604
DEBUG
plannedWork='0.00000'
2019-06-01 10:51:29.605 ***** ERROR ***** [V8.0.4] ERROR *****
2019-06-01 10:51:29.605 ***** ERROR ***** [V8.0.4] on file '/usr/share/projeqtor/tool/jsonPlanning.php' at line (1583)
2019-06-01 10:51:29.605 ***** ERROR ***** [V8.0.4] cause = Division by zero

Note: When I patch with +0 ($pct=($ass->plannedWork+0)?round($ass->realWork/$ass->plannedWork*100,0):0;) it works correctly.
Last edit: 01 Jui 2019 10:57 by dieperie.

Please Connexion or Create an account to join the conversation.

More
01 Jui 2019 20:15 #4 by babynus
Hi,

traces confirms your fix.
I will prefer a more secured patch, that will not raise an error with a possible null value :
  $pct=(floatval($ass->plannedWork))?round($ass->realWork/$ass->plannedWork*100,0):0;
Patch 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.047 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.