Sitecore Item Version Tracker

 We have come across many times when we were asked to check and validate language versions of specific item(s), like how many languages exists for a particular item, how many numbered version exists , if any particular version has more than 10 versions per language and so on.

When we are dealing with the small site this check is easy and we can get the details in some time, but when we are working with a huge site which has so many items/language versions/numbered versions and so on this becomes a little difficult.

To make things little easy and generic so that teams working on different project has a platform and tool available to get this data- so that they can use this data and make necessary updates/corrections in Sitecore content tree, i thought of creating a tool for the same.

The idea behind this tool is simple- to get details around following:

  1. How many language version exists for a particular item.
  2. How many numbered versions exists for particular language version.
  3. To get list of items which are still not published.
  4. To get the language versions where the no of versions are greater than 10 (this is what Sitecore recommends)- this can be changed if required in the tool.
  5. Provide an option to download the report which then can be shared with concerned person(s) to make necessary changes.

You can check the code on Github here- https://github.com/ankitjoshi/sitecore-item-version-tracker

How to use:

Once the package is installed- tool can be accessed here – http://yourhostname/sitecore/admin/ItemVersionTracker.aspx

It has following parameters:

  1. Root Path– This contains the root path of the item which you want to check, this also support item GUID.
  2. Include Child Items- Checkbox to include child items also.
  3. Content Type- Content Type filter has been added to filter it based on Page/Non-page items like data items/module/image items etc..
  4. Language- Language filter to get item details based on specific language, this would show all the languages available under System->Languages.
  5. Filter By- here we have two filters available:
    1. Latest Version is not published“- This would list down all the language version items which is still not published to target database.
    2. Max Version“- This would filter all those language versions where more than 10 (this can be changed) versions has been created.

For example- If I want to test an item which is created under Home item and has multiple language versions, this is how it looks.

The listing has following details:

  1. Item ID- This is Item ID which user can click and navigate directly to content editor.
  2. Item Name– Name of the Item.
  3. Total Language(s)– This shows how many language versions exists for the selected Item- from the above screen shot we can see that three (3) language versions exists, “es-AR“,”en” and “fr-CA“.
  4. Language Name- Name of the language.
  5. Total Version(s)- This gives a count of how many numbered versions exists for a particular language version.
  6. Latest Version Live– This shows if the latest version exists in Source DB (master) has been published or not.
  7. Live Version- This give the language version no. which is published to live database.

If we include child items also by checking “Include Child Items” this is what we see.

From here if we want to filter it based on “Language“,/”If the item version is published or not“- we can select the filters and get the result.

Similarly- If we want to get all the items on english language version- we can apply language filter.

If we want to get all the language versions where more than 10 numbered versions exists we can select “Filter By” -> Max Versions, you can change the max version count by updating the same in “Sitecore.SharedSource.ItemVersionTracker.Settings.config

1
2
<!-- MaxVersion count... -->
      <setting name="Sitecore.SharedSource.ItemVersionTracker.MaxVersionCount" value="10" />

You can also download the report to share with other team members- just enter the root path, apply the filters as you want and click on “Download Report (CSV)” button.

I will keep adding more features/improvements to it based on the feedback, but I am sure this would give us some basic report of how versions has been handled in particular solution and what changes are required.

This would be helpful for teams working on some localization projects with multiple language versions to validate if all item versions are correct for the new loca/country.

Also created a youtube video to show how you can use this tool and what feature(s) are available.

Comments