Calendar shows icons for absences that are not applicable

If you need support with TeamCal Pro (installation, configuration, usage) post your request here.
Post Reply
parkerjnc
Fresh Boarder
Fresh Boarder
Posts: 2
Joined: 2013-05-24, 21:07
Are you a spam bot?: No

Calendar shows icons for absences that are not applicable

Post by parkerjnc » 2013-06-05, 01:18

If the Admin creates new users and there are already some users existing that have recorded absences, when the All (by group) calendar is displayed, the new users may display absence icons on the same day as an existing user based on the existing user's absences. Kind of hard to describe. Lets say User1 is existing and has set May 30, 2013 as a Sick Day. View the calendar and the icon for Sick Day appears for May 30. Create a new user, User2, who does not have a template for May yet. View the calendar and User2 is listed right after User1 and User2 has a Sick Day icon showing for May 30. This seems to happen in showmonth_helper.php because a template is found for User1 during the first pass. On the second pass for User2, a template is not found but the previous template seems to still exist and is not replaced even though a template is supposed to be created for the new user. This behavior can be corrected by adding

Code: Select all

   $T = new Template_model; 
right before

Code: Select all

   $found = $T->getTemplate($U->username,$year,$monthno);
in showmonth_helper.php.

This is based on my installation of TCP so I certainly do not rule out some other root cause due to something I've broken :wink:
User avatar
George
Platinum Boarder
Platinum Boarder
Posts: 382
Joined: 2004-11-29, 21:20
Are you a spam bot?: No
Contact:

Re: Calendar shows icons for absences that are not applicabl

Post by George » 2013-06-07, 13:28

Hi parkerjnc
thanks for spotting this. I will check it out...
User avatar
George
Platinum Boarder
Platinum Boarder
Posts: 382
Joined: 2004-11-29, 21:20
Are you a spam bot?: No
Contact:

Re: Calendar shows icons for absences that are not applicabl

Post by George » 2013-06-08, 13:26

Post Reply