Expand my Community achievements bar.

SOLVED

Modification in the default version Label

Avatar

Level 1

In AEM, when the version of the asset is created the version label by default is 1.0,1.1,1.2,.... 

I need to modify the version label like base version label needs to be 1 and the second version label needs to be 2, the version label should be integer instead of decimal.

Topics

Topics help categorize Community content and increase your ability to discover relevant content.

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

@gokulakannan 
This sounds like a job for a aem developer.
Maybe have a talk with your implementation agency about this.

In addition, i would like to tell you that this is a very good idea. A nice thing to have OOTB for every AEM Admin.
I imagine a checkbox somewhere in the tools to simply get this. AND i think you should write a "New Idea" Ticket to adobe about it. This way, maybe it gets developed for every AEM user in the future!

View solution in original post

4 Replies

Avatar

Community Advisor

@gokulakannan 

This modification isn't available OOTB. If you want to customize the version label to use integers instead of decimals, you may need to create a custom workflow step or use a versioning listener.

Option 1: Custom Workflow Step

  1. Create a Custom Workflow Step:

    • Create a custom workflow step that will be responsible for creating versions of assets.
    • You can do this by creating a new workflow model or modifying an existing one.
  2. Modify the Version Label:

    • In your custom workflow step, you need to modify the version label before creating the new version.
    • You can use a script or a custom Java class to achieve this.
  3. Update Version Label Format:

    • Ensure that your script or custom class sets the version label to an integer format.

Option 2: Versioning Listener

  1. Create a Versioning Listener:

    • Implement a versioning listener in AEM.
    • This listener will be triggered when a new version of an asset is created.
  2. Modify Version Label:

    • In your versioning listener, intercept the version creation event and modify the version label.
    • Set the version label to the desired integer format.
  3. Register the Listener:

    • Register your versioning listener in the OSGi configuration.

Avatar

Level 1

Hi, thanks for the response. I am not able to implement versioning listener, can you help me with this by providing documentation related to versioning listener?

Avatar

Correct answer by
Community Advisor

@gokulakannan 
This sounds like a job for a aem developer.
Maybe have a talk with your implementation agency about this.

In addition, i would like to tell you that this is a very good idea. A nice thing to have OOTB for every AEM Admin.
I imagine a checkbox somewhere in the tools to simply get this. AND i think you should write a "New Idea" Ticket to adobe about it. This way, maybe it gets developed for every AEM user in the future!

Avatar

Administrator

@gokulakannan Did you find the suggestions from users helpful? Please let us know if more information is required. Otherwise, please mark the answer as correct for posterity. If you have found out solution yourself, please share it with the community.



Kautuk Sahni