Modification in the default version Label | Community
Skip to main content
January 3, 2024
Solved

Modification in the default version Label

  • January 3, 2024
  • 2 replies
  • 1250 views

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.

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by Adilos-Cantuerk

@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!

2 replies

diksha_mishra
Community Advisor
Community Advisor
January 3, 2024

@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.
January 7, 2024

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?

Adilos-Cantuerk
Community Advisor
Adilos-CantuerkCommunity AdvisorAccepted solution
Community Advisor
January 9, 2024

@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!

kautuk_sahni
Community Manager
Community Manager
January 8, 2024

@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