Details

      Description

      An UpgradeProcess should be created to values of time zone ids to calendars. If the calendar belongs to a user resource, it should use the user's display time zone. If it belongs to a site resource, or to a calendar resource, it should use the portal time zone.

      Reproducing the upgrade can be tricky because there is no upgrade path from 6.2 to 7.0, and the first part of LPS-46591 was merged way before the upgrade process. So, we've created a branch based on the most recent master (but reverting the old LPS-46591 changes) as well as a WAR file with the previous build number.

      Steps to reproduce

      These tests are to be run over MysQL. If you are using another database, some adjustments in the SQL query can be necessary.

      1. Set company.default.time.zone to America/Los_Angeles in portal-ext.properties.
      2. Start up Liferay. Log in as admin.
      3. In the top right, click in "Test Test" > "My Account". Click in "Display Settings".
      4. Select the time zone "China Standard Time".
      5. Save it. Close the dialog.
      6. Deploy the attached WAR file.
      7. Add Calendar to a page from the "Liferay" site.
      8. Connect to the portal database with a SQL client. Execute
        select
            c.timeZoneId,
            ExtractValue(c.name, '/root/Name') as name,
            cn.value as className
        from Calendar c
            join CalendarResource cr on c.calendarResourceId = cr.calendarResourceId
            join ClassName_ cn on cr.classNameId = cn.classNameId;
        
      9. Deploy the fixed calendar.
      10. Connect to the portal database with a SQL client. Execute
        select
            c.timeZoneId,
            ExtractValue(c.name, '/root/Name') as name,
            cn.value as className
        from Calendar c
            join CalendarResource cr on c.calendarResourceId = cr.calendarResourceId
            join ClassName_ cn on cr.classNameId = cn.classNameId;
        

      Expected results

      • In step 8, an error message reporting that no such c.timeZoneId column exists will appear.
      • In step 10, there will be two resuls to the query.
        • One will have className equal to com.liferay.portal.model.Group and timeZoneId equal to America/Los_Angeles.
        • Other will have className equal to com.liferay.portal.model.User and timeZoneId equal to Asia/Shangai.

        Attachments

          Activity

            People

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

              Dates

              • Created:
                Updated:
                Resolved:
                Days since last comment:
                4 years, 31 weeks, 3 days ago

                Packages

                Version Package
                6.2.X EE
                7.0.0 M5