Uploaded image for project: 'In-Portal CMS'
  1. In-Portal CMS
  2. INP-1817

Change engine for storing export user presets

    XMLWordPrintable

    Details

    • Change Log Group:
      Fixed
    • Change Log Message:
      Export user preset data was lost with increase of saved export user preset amount.
    • Story Points:
      1
    • Copy Issue Key:
    • Patch Instructions:

      Patches must be submitted through Phabricator.

      Description

      Unit Name: export-user-preset
      DB Table: ExportUserPresets
      - Id - auto-increment
      - PortalUserId
      - ItemPrefix - varchar(100)
      - PresetName - varchar(255)
      - PresetData - text
      
      # Plan
      
      1. create "ExportUserPresets" database table: - 0.2h
      - core/install/install_schema.sql
      - core/install/remove_schema.sql
      - core/install/upgrades.sql
      2. create "export-user-preset" unit (no section or templates) - 0.3h
      3. in the "\kCatDBItemExportHelper::OnExportBegin" method inside if ( $this->_getExportSavePreset($object) ) { IF: - 0.5h
      - lookup user export preset in the database
      - if found, then update it with new data (only the "PresetData" column is changed)
      - if not found, then create new user export preset
      - the "PresetData" column value must be JSON-encoded for easier manipulations by hand
      4. in the "\kCatDBItemExportHelper::PrepareExportPresets" method: - 0.5h
      - build up array from user-saved export presets
      - use the same option key building logic as currently (concatenated list of exported columns)
      5. in the "\kDBEventHandler::mapPermissions" method map "OnDeleteExportPreset" event to the "view" permission - 0.5h
      6. in the "\CoreUpgrades::Upgrade_5_2_2_B3" method (file: core/install/upgrades.php) add code, that will transform "export_settings" persistent session variable (where export user presets were stored before) into corresponding records in the "ExportUserPresets" database table - 1h
      7. confirm, that: - 0.5h
      - user export preset removal works for non-root user
      - export preset saving/loading works as before (from a user interface perspective)
      - export preset data, that was in the database was correctly migrated and can be used
      8. review connected task comments & commit
      

      Quote: 3.5h*1.4 (doing) + 3h (quoting) = 8h

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                alex Alex
                Reporter:
                alex Alex
                Developer:
                Erik Snarski [Intechnic]
                Reviewer:
                Alex
              • 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 - 4h 56m
                  4h 56m