enonic / cms2xp

Enonic CMS to XP migration tool
0 stars 0 forks source link

Add current status of content to CMS Content mixin #28

Closed Bellfalasch closed 5 years ago

Bellfalasch commented 6 years ago

If used - add the current status of a content to the CMS content mixin (published, unpublished, archived, offline, online, you name it). Some might be on the menu, some on the content.

Bellfalasch commented 6 years ago

So we conclude this should be done. Perhaps using the existing CMS mixin (if that is not added due to configuration, what will happen then?).

It could contain a ComboBox value for CMS status: draft|published|approved|archived| ... more?

I see "approved" as content being approved but not published to any menuitem yet, while "published" is approved and added to menuitems. Maybe CMS2XP needs to handle this differently. As long as I can in CMS see that "ok, this content is approved but placed on menuitem X and not published there". Or, if these items are already flagged with publish.to data we can have status "published" and determine their status from the publish.to-field. No?

When XP later gets "ready"-checks for content, that can hook into this even better. For now, at least adding this status to the export lets developers script it.

aro commented 5 years ago

We agreed to create an option to export the status, using a mixin.

We will set the status name of the main version in a property.

These are the possible content status that are stored in CMS:

    DRAFT( 0, "draft" ),
    SNAPSHOT( 1, "snapshot" ),
    APPROVED( 2, "approved" ),
    ARCHIVED( 3, "archived" );

Commented in the same CMS class, there are 3 other "virtual" status that depend on the publish from and to values.

    // These are calculated
    //PUBLISH_WAITING( 4, "waiting" ),
    //PUBLISHED( 5, "published" ),
    //PUBLISH_EXPIRED( 6, "publish-expired" );