Hi,
I notice that the "Home Timesheet Component" (Timesheet portlet available in the users' home) presents strange info when a user has not yet logged any hour on the last week. Moreover, the message changes as soon as I change the user's locale.
For example, I just created the user01 and I did not assigned him to any project. With the Italian localization I can read:
Sono state inserite soltanto 26.25 ore lavorative su 32 ore disponibili durante gli ultimi 7 giorni. Aggiornare le ore o mettersi in contatto con il proprio responsabile.
That translated means:
You have so far logged only 26.25 hours worktime of the required 32 hours in the last 7 days. Please log your hours now or contact your manager.
Note that this info is wrong since 26.25 should be 0; I have changed "TimesheetRedirectNumHoursInDays" parameter to 40 so that 32 (which is the default) is also wrong.
Switching to en_US, without doing any other modification I can read now:
You have so far logged only 0 hours worktime and 8.0 hours absences of the required 40 hours in the last 7 days. Please log you hours now or contact your manager.
Here the information related to the Presence is correct, but an info about 8 hours of absences has appeared.
I defined a project and I associated the user. Then I logged 8 hours of presence.
In the Italian locale the message didn't change at all:
Sono state inserite soltanto 26.25 ore lavorative su 32 ore disponibili durante gli ultimi 7 giorni. Aggiornare le ore o mettersi in contatto con il proprio responsabile.
Swithcing to en_US the message become:
You have so far logged only 8.00 hours worktime and 8.0 hours absences of the required 40 hours in the last 7 days. Please log you hours now or contact your manager.
correct in the presences but still wrong in the absences.
I then added 2 days of absence.
The message in Italian:
Sono state inserite soltanto 26.25 ore lavorative su 32 ore disponibili durante gli ultimi 7 giorni. Aggiornare le ore o mettersi in contatto con il proprio responsabile.
And in english:
You have so far logged only 8.00 hours worktime and 8.0 hours absences of the required 40 hours in the last 7 days. Please log you hours now or contact your manager.
So they didnt change at all.
For a summary:
- with the italian locale the message is completely wrong and cannot change even if I actually log presences or absences.
- with the en_US (and probably any other) locale the message is wrong for the absences only
I use the 3.5 version of the software but the same behaviour I found on the on line demo also.
May you please give it a check?
thank you very much in advance
Giulio
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Thanks for posting. I guess this is a bug in the Italian localization. Localization strings may contain variables, and the Italian localizer might have changes the variable, so that the message now shows a different variable.
You can check the localiation in Admin -> Localization, and then switch "localization mode = ON". Please search in www.project-open.org for more info on L10n.
Cheers!
Frank
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi Frank,
thank you for the reply.
With the localization mode on I could notice that the message in Italian was written without any variable and so it can be fixed.
Nevertheless there is a variable that still in the US localization seem wrong:
The whole message looks like:
You have so far logged only %num_hours% hours worktime
%absences_hours_message% of the required %expected_hours% hours in the last
%num_days% days. Please log you hours now or contact your manager.
and the %absences_hours_message% variable is expanded into:
and %absences_hours% hours absences
How ever %absences_hours% as I said in my previous message seems to be wrong (it's 8 even for a newly created user).
May you please check for that specific variable?
Thank you!
Giulio
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi,
I had the same problem. I'm using version 3.5.
I found that in intranet-absences-procs.tcl this query is executed:
set num_absences [db_string absences_sum "
select count(*)
from (
select count(*)
from
im_user_absences a,
im_day_enumerator(now()::date - '7'::integer, now()::date) d
where
owner_id = :user_id
and a.start_date <= d.d
and a.end_date >= d.d
) ttt
" -default 0]
SELECT COUNT(*) FROM SELECT COUNT(*) will always return 1, then if we multiply it by 8, we will always get 8 hours of absenses.
I removed the first "SELECT COUNT(*)" and it works.
I hope this helps.
Regards,
Leonardo (from Argentina)
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi,
I notice that the "Home Timesheet Component" (Timesheet portlet available in the users' home) presents strange info when a user has not yet logged any hour on the last week. Moreover, the message changes as soon as I change the user's locale.
For example, I just created the user01 and I did not assigned him to any project. With the Italian localization I can read:
Sono state inserite soltanto 26.25 ore lavorative su 32 ore disponibili durante gli ultimi 7 giorni. Aggiornare le ore o mettersi in contatto con il proprio responsabile.
That translated means:
You have so far logged only 26.25 hours worktime of the required 32 hours in the last 7 days. Please log your hours now or contact your manager.
Note that this info is wrong since 26.25 should be 0; I have changed "TimesheetRedirectNumHoursInDays" parameter to 40 so that 32 (which is the default) is also wrong.
Switching to en_US, without doing any other modification I can read now:
You have so far logged only 0 hours worktime and 8.0 hours absences of the required 40 hours in the last 7 days. Please log you hours now or contact your manager.
Here the information related to the Presence is correct, but an info about 8 hours of absences has appeared.
I defined a project and I associated the user. Then I logged 8 hours of presence.
In the Italian locale the message didn't change at all:
Sono state inserite soltanto 26.25 ore lavorative su 32 ore disponibili durante gli ultimi 7 giorni. Aggiornare le ore o mettersi in contatto con il proprio responsabile.
Swithcing to en_US the message become:
You have so far logged only 8.00 hours worktime and 8.0 hours absences of the required 40 hours in the last 7 days. Please log you hours now or contact your manager.
correct in the presences but still wrong in the absences.
I then added 2 days of absence.
The message in Italian:
Sono state inserite soltanto 26.25 ore lavorative su 32 ore disponibili durante gli ultimi 7 giorni. Aggiornare le ore o mettersi in contatto con il proprio responsabile.
And in english:
You have so far logged only 8.00 hours worktime and 8.0 hours absences of the required 40 hours in the last 7 days. Please log you hours now or contact your manager.
So they didnt change at all.
For a summary:
- with the italian locale the message is completely wrong and cannot change even if I actually log presences or absences.
- with the en_US (and probably any other) locale the message is wrong for the absences only
I use the 3.5 version of the software but the same behaviour I found on the on line demo also.
May you please give it a check?
thank you very much in advance
Giulio
Hi Giulio,
Thanks for posting. I guess this is a bug in the Italian localization. Localization strings may contain variables, and the Italian localizer might have changes the variable, so that the message now shows a different variable.
You can check the localiation in Admin -> Localization, and then switch "localization mode = ON". Please search in www.project-open.org for more info on L10n.
Cheers!
Frank
Hi Frank,
thank you for the reply.
With the localization mode on I could notice that the message in Italian was written without any variable and so it can be fixed.
Nevertheless there is a variable that still in the US localization seem wrong:
The whole message looks like:
You have so far logged only %num_hours% hours worktime
%absences_hours_message% of the required %expected_hours% hours in the last
%num_days% days. Please log you hours now or contact your manager.
and the %absences_hours_message% variable is expanded into:
and %absences_hours% hours absences
How ever %absences_hours% as I said in my previous message seems to be wrong (it's 8 even for a newly created user).
May you please check for that specific variable?
Thank you!
Giulio
Hi,
I had the same problem. I'm using version 3.5.
I found that in intranet-absences-procs.tcl this query is executed:
set num_absences [db_string absences_sum "
select count(*)
from (
select count(*)
from
im_user_absences a,
im_day_enumerator(now()::date - '7'::integer, now()::date) d
where
owner_id = :user_id
and a.start_date <= d.d
and a.end_date >= d.d
) ttt
" -default 0]
SELECT COUNT(*) FROM SELECT COUNT(*) will always return 1, then if we multiply it by 8, we will always get 8 hours of absenses.
I removed the first "SELECT COUNT(*)" and it works.
I hope this helps.
Regards,
Leonardo (from Argentina)
Hi Leonardo,
Thanks for posting.
We've included your patch into the V4.0.2 product code.
Cheers!
Frank