Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-32827

Fix calendar events with empty "eventtype" field during upgrade.

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Critical
    • Resolution: Fixed
    • Affects Version/s: 2.2.2
    • Fix Version/s: 2.2.5, 2.3.2
    • Component/s: Calendar
    • Labels:
    • Testing Instructions:
      Hide
      • This needs to be tested on all supported databases
      • This needs to be tested on all patched branches
      • The testing needs, changes both before and after the patch is applied.

      Testing instructions

      1. Create calender event of type user, group, site, due(Assignment) on a site without the patch
        • site events (sitepages->calendar->new event->type>site)
        • user events (sitepages->calendar->new event->type->user)
        • group events(sitepages->calendar->new event->type->group) (you must have multiple groups)
        • due events (Create an assign module with a future due date)
        • due events (Create an assignment module with a future due date)
      2. Goto database and make a note of id and their associated "Eventtype" in the table "Event"
      3. Delete the values in the column 'eventtype'
      4. Apply the patch
      5. it should prompt you for an upgrade, run the upgrade.
      6. Goto database again and make sure all events have "Eventtype" as noted on step 2
      7. visit the calendar and make sure no errors are shown
      8. Repeat with atleast one more database
        TEST 2
      9. Backup a course with calendar event
      10. check the box "include calendar events" while backing up
      11. open the backup file and edit the calendar.xml to remove event type
      12. restore the new backup file
      13. make sure the new course has calendar events with appropriate event types
      Show
      This needs to be tested on all supported databases This needs to be tested on all patched branches The testing needs, changes both before and after the patch is applied. Testing instructions Create calender event of type user, group, site, due(Assignment) on a site without the patch site events (sitepages->calendar->new event->type>site) user events (sitepages->calendar->new event->type->user) group events(sitepages->calendar->new event->type->group) (you must have multiple groups) due events (Create an assign module with a future due date) due events (Create an assignment module with a future due date) Goto database and make a note of id and their associated "Eventtype" in the table "Event" Delete the values in the column 'eventtype' Apply the patch it should prompt you for an upgrade, run the upgrade. Goto database again and make sure all events have "Eventtype" as noted on step 2 visit the calendar and make sure no errors are shown Repeat with atleast one more database TEST 2 Backup a course with calendar event check the box "include calendar events" while backing up open the backup file and edit the calendar.xml to remove event type restore the new backup file make sure the new course has calendar events with appropriate event types
    • Affected Branches:
      MOODLE_22_STABLE
    • Fixed Branches:
      MOODLE_22_STABLE, MOODLE_23_STABLE
    • Pull Master Branch:
      MDL-32827-master

      Description

      Due to MDL-32826 there can be events without any "Eventtype" value. This should be fixed during upgrade based on the values of courseid and userid.
      Please refer the linked issues to understand the problems it is creating.

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

                People

                • Votes:
                  0 Vote for this issue
                  Watchers:
                  1 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved:
                    Fix Release Date:
                    10/Sep/12