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

Version Control for Sections

    XMLWordPrintable

    Details

    • Type: Feature Request
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 5.1.1
    • Fix Version/s: 5.2.0-B1
    • Component/s: Admin Interfaces
    • Labels:
      None
    • Additional information:
      Hide

      [B]Additional tasks in In-B:[/B]

      #33461 - Versions Control & Editorial Interfaces
      #33701 - Implement "Versions Control & Editorial Interfaces"

      [B]Plan of Development / TODO:[/B]

      1. create PageRevisions table with following fields:

      • RevisionId, PageId, RevisionNumber, IsDraft, FromRevisionNumber, CreatedById, CreatedOn, Status

      2. add LastRevisionNumber field to Category table (will be set to last pending revision, that was approved OR to last revison, when approval isn't used)

      3. add RevisionId, ContentAutoSaved field to PageContent table

      4. user can't approve revision, which has PageRevisions.FromRevisionNumber < Category.LastRevisionNumber

      5. when viewing 5th page revision, then use this formula to get proper content block to show:
      SELECT pc.*
      FROM PageContent pc
      JOIN PageRevisions pr ON pr.PageId = pc.PageId
      WHERE pc.PageId = X AND pc.Num = Z AND ( (pr.RevisionNumber = 5 AND pr.CreatedById = Y AND pr.IsDraft = 1) OR (pr.IsDraft = 0 AND pr.Status = 1) )
      ORDER BY pr.RevisionNumber DESC

      6. when creating a draft, then copy all page content blocks to it

      7. drafts don't have revision number until then are officially saved (IsDraft = 0 -> IsDraft = 1 - generate new revision number)

      8. when content block is added (e.g. page design changes), then create it's empty version for all past revisions

      9. create following new permissions:

      • CATEGORY.REVISION.MODERATE
      • CATEGORY.REVISION.ADD
      • CATEGORY.REVISION.ADD.PENDING
      • CATEGORY.REVISION.HISTORY.VIEW
      • CATEGORY.REVISION.HISTORY.REVERT

      10. to preview any revision from past you need to have CATEGORY.REVISION.HISTORY.VIEW permissions & pass "revision=N" in url of that page. In this mode any existing drafts won't override given revision number. Also this will force "Browse Mode" to be used, so no editable content blocks.

      11. when viewing revision from a history OR own draft, then hide "Publish, Decline" button

      12. when viewing revision from a history show "Restore" button

      13. clicking on Restore button (only, when user has CATEGORY.REVISION.HISTORY.REVERT permission) will create new revision from currently viewed revision and make it live/pending, based on user permissions

      14. display current revision (live or viewed from history) number, author, creation time

      15. if user already has a draft, then it will be used instead of creating new draft

      16. when content block editor window is opened & auto-save happens, then current editor content is saved into ContentAutoSaved column instead of Content column. This is done so user can click "Cancel" toolbar button and see intact page content from moment he opened content block editing window

      17. when user clicks "Save" button in content block editing windows, then do "auto save" + move content from ContentAutoSaved to Content column

      18. we need to be able to store N number of Revisions for each Section, number can be configurable (start with 20?). This way when 21th revision is created, then 1st is deleted.

      19. reverting to a previous Revision will create a new Revision (basically current/new state of all Content Blocks)

      20. clicking on a revision from history will load this revision (then Preview button will view this revision in a popup) if it has CATEGORY.REVISION.HISTORY.REVERT or CATEGORY.REVISION.MODERATE permissions

      21. create draft (when missing) when content block is changed, instead of saving changes right to it

      ---------------------------

      What toolbar buttons do:

      • "Save" will save the revision but will NOT publish to the site (depending on a permissions)
      • "Discard" will permanently delete draft
      • "Publish" will publish to the website (when user has permission to do that)
      • Deny (will return the revision into the draft state for someone to continue working with - it would be nice to be able to specify a reason for it!)
      • "Preview" will show you the preview without saving or publishing (only for drafts)
      • "Restore" will restore the currently selected revision and will publish it (depending on permission)
      Show
      [B] Additional tasks in In-B: [/B] #33461 - Versions Control & Editorial Interfaces #33701 - Implement "Versions Control & Editorial Interfaces" [B] Plan of Development / TODO: [/B] 1. create PageRevisions table with following fields: RevisionId, PageId, RevisionNumber, IsDraft, FromRevisionNumber, CreatedById, CreatedOn, Status 2. add LastRevisionNumber field to Category table (will be set to last pending revision, that was approved OR to last revison, when approval isn't used) 3. add RevisionId, ContentAutoSaved field to PageContent table 4. user can't approve revision, which has PageRevisions.FromRevisionNumber < Category.LastRevisionNumber 5. when viewing 5th page revision, then use this formula to get proper content block to show: SELECT pc.* FROM PageContent pc JOIN PageRevisions pr ON pr.PageId = pc.PageId WHERE pc.PageId = X AND pc.Num = Z AND ( (pr.RevisionNumber = 5 AND pr.CreatedById = Y AND pr.IsDraft = 1) OR (pr.IsDraft = 0 AND pr.Status = 1) ) ORDER BY pr.RevisionNumber DESC 6. when creating a draft, then copy all page content blocks to it 7. drafts don't have revision number until then are officially saved (IsDraft = 0 -> IsDraft = 1 - generate new revision number) 8. when content block is added (e.g. page design changes), then create it's empty version for all past revisions 9. create following new permissions: CATEGORY.REVISION.MODERATE CATEGORY.REVISION.ADD CATEGORY.REVISION.ADD.PENDING CATEGORY.REVISION.HISTORY.VIEW CATEGORY.REVISION.HISTORY.REVERT 10. to preview any revision from past you need to have CATEGORY.REVISION.HISTORY.VIEW permissions & pass "revision=N" in url of that page. In this mode any existing drafts won't override given revision number. Also this will force "Browse Mode" to be used, so no editable content blocks. 11. when viewing revision from a history OR own draft, then hide "Publish, Decline" button 12. when viewing revision from a history show "Restore" button 13. clicking on Restore button (only, when user has CATEGORY.REVISION.HISTORY.REVERT permission) will create new revision from currently viewed revision and make it live/pending, based on user permissions 14. display current revision (live or viewed from history) number, author, creation time 15. if user already has a draft, then it will be used instead of creating new draft 16. when content block editor window is opened & auto-save happens, then current editor content is saved into ContentAutoSaved column instead of Content column. This is done so user can click "Cancel" toolbar button and see intact page content from moment he opened content block editing window 17. when user clicks "Save" button in content block editing windows, then do "auto save" + move content from ContentAutoSaved to Content column 18. we need to be able to store N number of Revisions for each Section, number can be configurable (start with 20?). This way when 21th revision is created, then 1st is deleted. 19. reverting to a previous Revision will create a new Revision (basically current/new state of all Content Blocks) 20. clicking on a revision from history will load this revision (then Preview button will view this revision in a popup) if it has CATEGORY.REVISION.HISTORY.REVERT or CATEGORY.REVISION.MODERATE permissions 21. create draft (when missing) when content block is changed, instead of saving changes right to it --------------------------- What toolbar buttons do: "Save" will save the revision but will NOT publish to the site (depending on a permissions) "Discard" will permanently delete draft "Publish" will publish to the website (when user has permission to do that) Deny (will return the revision into the draft state for someone to continue working with - it would be nice to be able to specify a reason for it!) "Preview" will show you the preview without saving or publishing (only for drafts) "Restore" will restore the currently selected revision and will publish it (depending on permission)
    • Change Log Message:
      Added Version Control feature for Sections
    • Story Points:
      3
    • External issue ID:
      1117
    • Copy Issue Key:
    • Patch Instructions:

      Patches must be submitted through Phabricator.

      Description

      There is a need to develop new Version Control system for SMS Sections. This would include Auto-Save and Approval (Public/Decline) system allowing users to manage the content.

      See attached interfaces (images).

      [B]Actions[/B]

      1. Each user can have only 1 Draft at a time. Draft is the Revision of the page that he is Editing until he actually saves it.

      2. User can "Preview" his Draft at any point - it will open a pop-up (or tab) with a Front-end of that page showing how his Draft will look when published live.

      3. User can "Discard" his Draft at any point and it will delete/clear all changes.

      4. User can "Save" his Draft and it becomes a Revision:
      a. Revision will become Public right away ONLY if User had Permissions to piblish to Live
      b. Revision will become Pending if User did NOT have Permissions to piblish to Live

      5. User can "Load" other Revisions and if has special permissions and "Approve" / "Decline" Pending Revisions submitted by other users.

      6. User can "Load" other Revisions and if has special permissions and "Restore" to previous revisions.

      7. Any time user start Content Block Editing (clicks on Edit) and pop-up (or modal window) loaded, system will create/update a Draft of this page if there wasn't one already. This is directly related to the Auto-save functionality in that Editing pop-up.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                alex Alex
                Reporter:
                dmitry Dmitry Andrejev [Intechnic]
                Developer:
                Alex
              • Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: