Uploaded image for project: 'TeamCal Pro'
  1. TCP-34

Calendar shows icons for absences that are not applicable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: High
    • Resolution: Fixed
    • Affects versions: 3.6.005
    • Fix versions: 3.6.006
    • Components: GUI
    • Labels:
      None

      Description

      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

      $T = new Template_model;

      right before

      $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:

        Attachments

          Activity

            People

            • Assignee:
              george George Lewe
              Reporter:
              george George Lewe
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Time Tracking

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0h
                0h
                Logged:
                Time Spent - 2h
                2h