Mystery of the missing SharePoint Alerts!

We’ve been working with a client for a few weeks on and off regarding an issue with their SharePoint instance following a migration project (not conducted by us) which had the effect of breaking the alerting function for SharePoint Issue Lists which they use heavily throughout their organisation.

A quick visual inspection on their server and some digging with PowerShell showed nothing out of the ordinary, in fact it mirrored my test environment identically apart from the fact alerts weren’t being sent.  I stepped through the excellent and comprehensive SharePoint Alert Troubleshooting Guide which on another day would probably have resolved the issue but not this time.

As you do when you get to the hopelessness stage of a SharePoint issue you sometimes find the problem fixes itself and this was (almost the case here).  In the advanced settings of a SharePoint Issue list there is a Yes/No option titled “Send e-mail when ownership is assigned?” which was set to “Yes” as it should have been.  I changed the value to “No”, clicked OK, changed the value back “Yes” and clicked OK again and suddenly alerts sprang back into life! Disbelief is only word I can use to describe how I felt about the whole issue!  Looks like somehow during the migration, the “Yes” value of this property got lost yet this wasn’t reflected in the SharePoint UI.

Anyway, as the client had over 50 issues lists I decided to automate the process as I didn’t fancy doing the task manually, so here’s a handy PowerShell script to “toggle” the list back into life!

$site = Get-SPSite "http://localhost"
foreach ($web in $site.AllWebs) 
  foreach ($lst in $web.lists | where-object {$_.BaseType -eq "Issue"}) 
	$lst.EnableAssignedToEmail = $false
        $lst.EnableAssignedToEmail = $true

Grouping List By Content Type

Simple Task
Create a custom view on a SharePoint list grouping the items by Content Type

You just select Content Type from the Group By field list right? Eh, where is the Content Type field?  I’ve always been confused as to why this isn’t supported out the box by SharePoint but I guess there must be a good reason!?

Salvation is here though fellow SharePointers, you can achieve grouping by Content Type by using SharePoint Designer.  The simplest approach is to create your custom view in the SharePoint web interface and group on one of the available columns (Title, Modified, Created etc) and then save the custom view.  Open SharePoint Designer and navigate to your list, double-click your custom view from the Views list (see below).

Once the view is open in the editor, search for “<GroupBy>” which will take you to the GroupBy filter fields, change the current fieldname in the Name parameter of the FieldRef element to “ContentType” and click save

That’s it, a SharePoint list grouped by Content Type!  Easy when you know how.

NOTE: If you edit the view again via the web interface the customisation will be lost as there is no option in the Group By field list for ContentType.

SharePoint Development and Customisation

Welcome to our SharePoint Development and Customisation blog.  I’m Steven Gardner and I’m a technical lead on SharePoint for Brightwire an Edinburgh Microsoft SharePoint Partner.  Over the coming months I’ll be posting (hopefully) interesting snippets and thoughts about SharePoint development and customisation and how we’ve used SharePoint to fulfil our clients needs.  Topics coming up are likely to be:

  • Using the SharePoint Managed Metadata Provider
  • Benefits of Web Content Management in SharePoint
  • Debugging SharePoint solutions