SharePoint Dragons

Nikander & Margriet on SharePoint

My Tasks web part outside of MySites, but pointing to the personal site task list?

We had a requirement to place a My Tasks web part outside of SharePoint personal sites, in a regular site collection, pointing to the Tasks list of a personal site. There were two interesting blog posts surrounding this topic. The first one, http://bernado-nguyen-hoan.com/2013/03/03/making-my-tasks-web-part-available-outside-of-mysites/ , mentions that it’s possible to use the My Tasks web part outside of My Sites by enabling the hidden My Tasks Dashboards feature on a specific web, which can be done like this:

Enable-SPFeature 89D1184C-8191-4303-A430-7A24291531C9 -url [http://[url_web]http://[url_web]

Doing that actually adds the My Tasks web part to the web part gallery, but it is not enough. The next resource has more to say about that: http://yalla.itgroove.net/2014/04/27/use-sharepoint-tasks-web-part-outside-sites/ The approach proposed here involves exporting the My Tasks web part, then import it in the other site collection and copy a couple of pages needed by this web part to another site collection. The presence of these pages is an absolute necessity to get the My Tasks web part. After doing some experimenting, most of the tabs of the My Tasks web part indeed work correctly (namely “Active”, “Completed”, and “Recently Added”) after following this approach, but the “Important and Upcoming” tab remains a problem. That is, if you want it to refer to the Personal Site task list.

This problem, that lies in the TimeLine web part, is quite definitive. As it turns out, the web part calls a method named IsAddressValid() of the TimelineDataSourceToolPart web part (which is part of the Microsoft.SharePoint.WebPartPages namespace of the Microsoft.SharePoint assembly). This method checks that the data source points to a URL that is part of the same site collection hosting the My Tasks web part. So, site collection X can never have a working “Important and Upcoming” tab in a My Tasks web part that points to the Personal Site Tasks list.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: