I was fortunate to have a preview version the up and coming 2013 release of SDL Tridion to play with. One new feature is Bundles, which is basically a new type of organizational item, which allows you to group together related items, and do operations on them as a whole. Typically this would be putting it through workflow, or publishing them all together in a single transaction, but one nice thing about them is that you can use them however you want to, just add items into a bundle, and use it however you need to.
The new release of Content Porter will also be bundle-aware, which got me thinking that there should be an easy way to keep track of changed items during development using bundles to avoid the pain of keeping track manually. It turns out to be really easy using the Event System.
What I did is:
Create a folder called Release Packages in the root folder in the top publication in your Blueprint
In each publication in which you will create or change items, create a new Bundle within the Release Packages folder. To make it easy in my code, I made the bundle name the same as the publication which it lives in.
Create an event handler to add items to the appropriate bundle when they are created/updated
Go ahead and do your development – watch new and updated items be added into appropriate bundles
Use Content Porter to port the bundles to your test/production environment
Remove the contents of all the bundles before the next iteration of development
Heres the Event Handler code, as you can see theres not much too it, just implement 3 types of event:
When a VersionedItem is checked in
When an OrganizationalItem is saved
When a RepositoryLocalObject is localized
I had a bit more time, so fluffed this example out a bit to auto-create the Release Packages folder and bundles on demand. I also updated it to cover Categories, and Keywords (which need their own event as they are not VersionedItems, or OrganizationalItems).