In Tridion 2013 how can we identify which items are imported via Content Porter 2013 SP1. Is any specific event triggered when items are imported via Content Porter in Tridion 2013. In case 2011, we could have dedicated user for Content porter imports, then on basis of this user we could identify the items imported via Content Porter. Is there an alternative to same in Tridion 2013 ?
Content Porter (or more general: the CM Import/Export service) triggers the same events as when the same actions were performed on the TOM.NET API directly, but it does set Session.ContextData so that event handlers can detect that the events are triggered by an CM Import (or Undo) action.
Note that this is true for Tridion 2013 SP1 and higher (earlier versions didn't have an Import/Export service yet).
There are multiple ways to check the items that you have ported from 1 environment to another.
You can check the log file that is generated at the time of content import.
You can search by date modified and author. (If that information is available with you)
But the best option I should suggest -
Create a bundle > Add all the items to that bundle > Export/Import that Bundle
Then it will be easier for you to track what you have imported to the next environment.
You can take the same approach in Tridion 2013 SP1 (as you did in Tridion 20111) and have a dedicated Tridion user for performing content ports. However, as I am sure you found with Tridion 2011, there are a number of drawbacks to this, including:
- That user needs to be created in all environments that you want to import into.
- You will need to set up Tridion security on your Content Porter User. This may even have to be a Tridion Administrator
- If there is more that one person that runs Content Porter then you'll have to share the credentials for your Content Porter User. This is obviously a security concern.
- If an item later gets deleted then you will not be able to find any trace of that item being imported.
Sayantan suggested a couple of approaches that would give you this information. However, these are not foolproof:
- If you have a lot of imports then trying to stitch together item IDs from multiple log files can be time consuming and error prone
- Although you can use 'Advanced search', there are some items (Structure Groups, Keywords, Folders, etc.) that do not maintain a version history, so you can only find who the last amend was made by.
If it is imperative that the information about what was imported is 100% accurate then you could write your own custom tool using the supported Import / Export Service (in Tridion 2013 SP1) and log this information to a persistent data store (database, etc.). This would have the added advantage of each person running the import being able to use their own Tridion account.
If the accuracy is less important (E.g. this is for more general reporting, rather than for an official audit), then you could write a core service tool to get this information (based on the user importing the content), which you run right after your imports, or use Advanced search (as suggested by Sayantan).