In-Portal Issue Tracker

Welcome to the In-Portal Open Source CMS Issue Tracker! This is a central management / tracking tool for all types of tasks / issues / bugs for the In-Portal Project. Before reporting any issues, please make sure to read the Guide into Issue Tracker and How to Properly Test and Report Bugs!

View Revisions: Issue #1117 All Revisions ] Back to Issue ]
Summary 0001117: Version Control for Sections
Revision 2011-09-07 18:43:18 by Dmitry
Additional Information Additional tasks in In-B:

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


Plan of Development / TODO:

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)

Revision 2011-09-07 18:40:58 by Dmitry
Additional Information Additional tasks in In-B:

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



Web Development by Intechnic
In-Portal Open Source CMS
In-Portal Open Source CMS
Copyright © 2000 - 2009 MantisBT Group

Powered by Mantis Bugtracker