Logo 
Search:

Sharepoint Forum

Ask Question   UnAnswered
Home » Forum » Sharepoint       RSS Feeds

Issues List: How to restore? "Include Content" not available

  Asked By: Raymundo    Date: Sep 25    Category: Sharepoint    Views: 13021

Does anyone know a trick for saving a Issues List as a template?

Someone deleted an entire Issues List today. :/ I have a copy of the Site from last night, but no way to migrate the Issues List template (with Content) from the backup to the production Site.

I can export the Site Template, and copy/paste the content, but it loses a lot of information, Modified,Created,Current, etc.

Share: 

 

5 Answers Found

 
Answer #1    Answered By: Guadalupe Bullock     Answered On: Sep 25

when you save as template  there is a checkbox where you can include  data. did you check that box?

 
Answer #2    Answered By: Nathanial Mcclure     Answered On: Sep 25

If the template  size will be more than 10 MB, including content  won’t work and he will lose all the user specific data… everything will probably recreate under the user name and timestamp of the user creating it from the template.

Ewan, can you possibly restore  the entire  site? Other than rebuilding the Issues list, I think that is your only option. Maybe someone else has run into this.

 
Answer #3    Answered By: Matt Prince     Answered On: Sep 25

Another idea is to use the Export to Excel… Disconnect the list  and reconnect the list to a new site. Of course, views will be lost but it will move all of the data pretty easily… In the worst case scenario, he can save the template  without content, and use Excel to transport the data.

 
Answer #4    Answered By: Brooks Bond     Answered On: Sep 25

Working with SPS gives me indigestion sometimes -- okay, frequently. =)

I opened a ticket with Microsoft on this, they confirmed that the "Include Content" option is not available with Issues Lists (its greyed out). They are going to get back with me and provide a Web Part solution; it sounds like I'll need to do some code modifications (probably have to hard code in url, list  name, etc). The Web Part should somehow provide some relief for migrating the data over. I really thought they would have had a customized smigrate.exe utility to do this... I'll post a follow up to reply to detail their solution.

I've seen a post or two on other solutions, like identifying the List GUID in the db and copying the db items over and updating the nextupdatecounter, but I'm going to stay away from messing with the db on this one.

 
Answer #5    Answered By: Gregg Wilkinson     Answered On: Sep 25

this is the code MS provided to migrate  the data from an issues  list on one Portal to another -- in an attempt to 'restore' an Issues list. I can't wait for the V3 Recycle Bin. =)

Please find the attached code to Migrate data from one site  to another
SPSite siteCollection = new SPSite("http://pavan-sec"); // http://pavan-sec is the Sharepoint portal server name
SPWeb destSite = siteCollection.AllWebs ["sites/PavanSite"]; // PavanSite is the destination site to which the Issue list  items needs to be migrated to.
SPWeb srcSite = siteCollection.AllWebs["sites/WellDon1"]; // WellDon1 is the site on which the Issues list exist.
SPList srcList = srcSite.Lists["PavanTestIssue"]; // PavanTestIssue is the name of the Issues list on the source site
SPView srcView = srcList.Views["My Issues"]; // My Issues is the view from which the data needs to be transferred from


SPListItemCollection srcItems = srcList.GetItems(srcView);
SPListItemCollection destItems = destSite.Lists["PavanClear"].Items; // PavanClear is the destination Issues list name.

foreach (SPListItem srcItem in srcItems)
{
SPListItem newItem = destItems.Add();

newItem["Status"] = srcItem["Status"];
newItem["Created"] = srcItem["Created"];
newItem["Priority"] = srcItem["Priority"];
newItem.Update();
}
}

I have tried copying the data of only 3 columns like Status, Priority and Created. Similarly you can add other columns in the issues list and test. NOTE : Before running it on the Production box please test this on a Test environment and confirm it works fine for you.

 




Tagged: