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.

Work allocation in ...
 
Notifications
Clear all

Work allocation in half-days

5 Posts
3 Users
0 Reactions
4,230 Views
(@michel-guillot)
Posts: 5
Active Member
Topic starter
 
[#1918]

Hi,

The unit for real work allocation and for workload are for both in days in my global parameters. On the real work allocation screen I can enter a value of one day for a given day and a given activity and a given week but it seems I can't enter a value of half a day for instance: 0,5 (I'm using the french UI). More precisely the input is accepted when I save it but when I come back on this screen later on the input value is back to 0. If I try 0,7 it's the same thing. Only a value equal to 1 seems to be saved.

I'm using the lastest version 4.3.3

Thanks for your help

Michel


 
Posted : 21 Jul 2014 18H36
babynus
(@babynus)
Posts: 14954
Main Contributor Admin
 

Can you check that :

1) you don't reproduce on Demo version ( http://demo.projeqtor.org)
(to be sure it is a server side issue)

2) in database format for column work of table work is decimal(8,5)

3) in /model/NumberFormatter.php, you have : const DECIMAL=2;

4) check value for "number of hours per day" in Global parameters screen (should not be zero)


 
Posted : 22 Jul 2014 1H40
(@michel-guillot)
Posts: 5
Active Member
Topic starter
 

Hi babynus,

So as requested I checked the following points and confirm that:

1) I couldn't reproduce the problem on the online demo version, so it seems it is a server side issue
2) in database the type of column work of table work is: decimal(8,5) unsigned
3) I didn't find file /model/NumberFormatter.php but I think you meant /model/NumberFormatter52.php: const DECIMAL=2;^M
4) "number of hours per day" = 8

So all seems to be OK...

Have you other points to check maybe more related to the server config ? Here are some more data on my server config:
OS: CentOS Linux 6.5
PHP: Version 5.4.30
MySQL: version 5.5.38

Thank you for your support


 
Posted : 23 Jul 2014 12H46
Klaus
(@climb4fun)
Posts: 449
Contributor
 

Hello Michel,

just to chip in: we work with hours. This eliminates the issue in discussion and is more accurate in reporting the efforts.

Regards,

Klaus


 
Posted : 30 Jul 2014 15H14
(@michel-guillot)
Posts: 5
Active Member
Topic starter
 

To Klaus,

Thanks for trying to help. I tried to use hours instead of days but that didn't help. I think I read somewhere that allocations are stored in days internally...

To Babynus,

It was as you said a server configuration issue.

First it seemed to me that it was a PHP issue because when I updated PHP from 5.4.30 to 5.4.32 on my dev server it began to work. I found that #67052 was solved in 5.4.31. That bug is related to NumberFormatter and the LC_NUMERIC locale, that's to say the use of commas for float number.

But I still had incorrect registration in the database (table work, column work) on my prod server, as compared with my dev server where it was working right. Another issue was that sometimes, the display was empty !

I've finally found that it was a problem of locale: LC_NUMERIC was set to en_DK.UTF-8 on my prod server whereas it was set to C on my dev server. When the query to update the database was built, the value to update was converted from float to string and the decimal point was replaced by a comma on my prod server, which made the query fail because whatever the locale mysql expects a point for foating point values.

After investigation, I traced the source of the problem to a conflict between TRAC and ProjeQtOr which are sharing the Apache server. TRAC was setting the locale to en_DK.UTF-8 BUT that setting was impacting not only the TRAC thread but also the whole Apache process and therefore ProjeQtOr also, as stated in setlocale:

Warning

The locale information is maintained per process, not per thread. If you are running PHP on a multithreaded server API like IIS or Apache on Windows, you may experience sudden changes in locale settings while a script is running, though the script itself never called setlocale(). This happens due to other scripts running in different threads of the same process at the same time, changing the process-wide locale using setlocale().

So to put things right I reestablished Apache defaut locale setting (C) by removing Apache SetEnv trac.locale "en_DK.UTF-8 directive and defining instead TRAC date format through a specific TRAC configuration setting (default_date_format = iso8601).

Regards,

Michel


 
Posted : 01 Sep 2014 17H38
Share:

Scroll to Top