Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Table of Contents
stylenone

Requirements

Structure

...

Plugin PACKAGED_Versions

This plugin holds all the services needed for the correct execution of the version management feature and thus needs to be activated on a project that wants to use the feature.

Structure

The version management feature is available only for assets with a workcopy-compliant structure. A An asset structure is considered workcopy-compliant if it has includes the following properties:

Property

Type

Description

copietravail

Child

->

#self

References the current version of the asset to

be replaced

replace.

uid

Text

Unique identifier linking asset versions in the format objectname_id

linking asset versions

.

Info

This field is empty for current versions that

haven’t

have not been replaced

by another version

yet.

version

Integer

Indicates the version number.

Info

These properties are can be verified in the Wizards tab of the object structure administration interface.

For the need to identify Additionally, for identifying archived versions, a new property has been added to the assets' structure :

...

Property

Type

...

Description

...

Arounf the tab “Versions”

...

versionsdata

Word

Stores version-related data, such as the reason for archiving (e.g., obsolete).

Configuration

Display Setup

The version management feature is accessible on the front end via the tab Versions from the Versions tab on the asset detail page.

...

To configure the tab display of that tab, use the following entry point can be used:

Code Block
$.common.namedDisplays.defaultAssetDetailTabVersions

...

By default, this configuration is included in the tab settings delivered via:

Code Block
$.common.namedDisplays.defaultAssetDetailMeta.column.tabs

...

Security

...

Under the security property of the tab configuration(defaultAssetDetailTabVersions.security), it is possible to define which security domain(s) should be evaluated to display the versions tab.

By default, it is preconfigured with :

...

languagejson

Configuration

The tab’s visibility depends on its security configuration:

  • Entry Point: defaultAssetDetailTabVersions.security

  • Default Security Domain: ["objectdata/insert"]

This means that the “Versions” default setup ensures the Versions tab is by default displayed visible to users allowed to create instances in the instance’s object visualized on the detail page.It is possible to use the following . Additional security domains include:

  • objectdata/insert

  • objectactions/create

  • objectactions/multiupdate

  • objectactions/delete

  • objectactions/view

  • objectactions/changestatus

Note

If

...

multiple security domains

...

are

...

specified, the user must be granted all listed permissions to see the

...

Versions tab.

Actions on

...

Versions

The available actions depend on the version type of versions and user permissions of the user.:

Draft

...

Version

  • Preview

    and edit

    & Edit:

    Only

    Allowed if the user

    is allowed to

    can edit the instance.

  • Delete:

    Only

    Allowed if the user

    is allowed to

    can delete the instance.

  • Publish:

    The publish action of a draft version is accessible from the previsualization interface. This action is enabled only

    Accessible through the preview interface if the user has permission to execute a workflow action

    that can take

    transitioning the instance to an online status.

Archived

...

Version

  • Preview:

    Works

    Allowed if the user

    is allowed to

    can edit the instance.

  • Delete:

    Only

    Allowed if the user

    is allowed to

    can delete the instance.

  • Restore:

    It’s possible to restore an archived version and make it become the current one. This action is displayed only

    Possible if the user has

    the right to process an action that can take

    permission to transition the asset from

    the

    archived

    status

    to

    an

    online status.

Current

...

Version

No actions are available

...

in the

...

Versions tab.

...

Related actions are accessible from the header section.

Note

Versions are still assets, and thus, they are evaluated through security the same way as assets not involved in version management (through their status, for instance).

Identification of versions

...

Version Identification

In certain situations, such as security assessments or base evaluations, it may be helpful to distinguish between the different types of versions. You can use the following table The table below describes how to do so this:

Version

type

Type

Description

Key Characteristics

Current

version (Published/Online)It represents the current

Version

The active version of an asset.

  • Status:

The status is always marked as
  • Always online.

If its field uid is not empty, the
  • uid

field
  • ends with _$id

with
  • , where $id

representing
  • is the

id of the
  • asset ID.

Draft

version (Workcopy)It's

Version

Represents the initial state of

the new version of a published asset. It has the same values as the asset that it has been created from except status, uid, copietravail and

a new version.

Unicity : An asset must
  • Must have exactly one workcopy.

  • copietravail

: Its field copietravail should always be populated with
  • links to the current version.

uid property is filled with asset_id
  • Status:

It must not have an online nor archived status
  • Not online or archived.

Archived

versionIt represents versions that were the current or active ones at a certain point in time and were

Version

Represents past current versions, replaced by a draft version

. They are now considered as obsolete

.

  • uid

=
  • : $objectname_$id (with $id different from the

id of the The status should always be an archived one
  • instance ID).

  • The field versionsdata contains the value obsolete

    • versionsdata: Contains "obsolete".

    • Status: Should be always archived.

    Miscellaneous features

    ...

    Tag: pkg/versions/keep/on/publish

    A new The tag pkg/versions/keep/on/publish has been introduced to be able to identify fields on assets structure that need to be kept and not overridden or changed when instances are replaced by new versions.

    It is by default assigned to the portals field.

    For example, let’s consider an asset identifies fields that must be retained when an instance is replaced by a new version.

    Example:

    • Asset X (current version)

    ...

    • is assigned to sections A and B

    ...

    • .

    • A new draft version of X

    ...

    • is created, retaining sections A and B.

    • While the

    ...

    • draft is

    ...

    • being worked on, Asset X is

    ...

    • assigned to a new section C

    ...

    • .

    • This assignment does not affect the draft version

    ...

    The tag pkg/versions/keep/on/publish prevents the deletion of reference C from being deleted after the publication of the draft version when it will replace the active version.

    To sum up, this tag is used to identify properties that we don’t want to change when the current version is replaced by the draft version. It can be added to other properties that will work on the same principle as portals.

    Filtering of archived versions on the front end

    Archived versions are not displayed on the front end by default. They are masked via a service of the plugin PACKAGED_Versions and are filtered by default when requesting the following types of API endpoints :

    ...

    • .

    Result: After publishing the draft version, section C remains assigned due to the retention tag.

    Filtering Archived Versions on the Frontend

    Archived versions are hidden by default via the PACKAGED_Versions plugin. They are filtered when using these API endpoints:

    • api/rest/dam/asset

    ...

    • (ASSET)

    • api/rest/dam/data/asset

    ...

    • (SEARCH)

    • api/rest/dam/data/asset1,asset2

    ...

    • (TOPSEARCH)

    • api/rest/dam/asset/aggs

    ...

    • (ASSET_AGGS)

    • api/rest/dam/data/aggs/asset1,asset2

    ...

    • (MULTI_AGGS)

    Customization Tip: Extend the APIBaseWhereBusinessServiceAdapter ( using the field versionsdata) inside a project plugin if you want to filter additional endpoint types on the front end or submit an amelioration ticket on the product if you find it useful to restrict more endpoints by default versionsdata field to filter additional endpoints as needed. Alternatively, consider submitting a product enhancement request.