Tasks Lists Roll-up beta, available for download

A new addition to the SharePoint User’s Toolkit: a Tasks Lists Roll-up Web Part. When placed on a SharePoint 2007 page (wss or MOSS), this Web Part will aggregate tasks from the current site and all its sub-sites.

After downloading the Web Part, you can add it to your page via the page import option, or include it in your Web Part gallery. This is a regular Data View Web Part, and you can later modify the layout in SharePoint Designer. Without SPD, you could also tweak it directly through the SharePoint UI, or even via a text editor.

Lists roll-ups are available OOTB in SharePoint, thanks to the Data View Web Part – no need for a Content Query Web Part (MOSS only) or third party tools. However setting a DVWP to work in CrossList mode is not easy, even for experienced SharePointers. Hopefully this preconfigured Web Part will give a jumpstart to your cross-list experience.

I’ll publish more explanations in the days to come. I also plan to add more options in the future, as well as roll-ups for other lists - feedback and suggestions are welcome!

In case of emergency
If your customizations break your page, keep in mind the contents=1 trick (explained for example at the end of this article).

    • Henning
    • June 7th, 2010

    This is quite nice, but what would really kick it, would be the fact, that I could query for *my* tasks. Well, that could easily be done be modifying the where clause of the CAML, but … I would also include tasks which are not assigned to me directly, but indirect via a group which I’m a member of.

    • As I mentioned in the post, what you get is a regular DVWP, to which you can apply usual filtering methods (CAML clause or data view filter).

      Indirect filtering via a group is a separate issue (roll-up or not doesn’t make a difference). I don’t see how this could be done directly in the Web Part. A good question for a forum!

        • Henning
        • June 8th, 2010

        Hmm, at least when you’re on the site where the task list resides you have a view called “assigned to my groups” (or something like that). So this has do be possible somehow – I just don’t hope they loop over all items and check the group membership; although I hestitate to find our because of “fear”.

  1. If you look at the CAML for the LVWP on the By My Groups view page, you’ll see this Where clause:

    <Where>
      <Membership Type="CurrentUserGroups">
        <FieldRef Name="AssignedTo"/>
      </Membership>
    </Where>
    

    If you look at the CAML schema (starting here http://msdn.microsoft.com/en-us/library/ms462365.aspx), you’ll see the details for Membership here http://msdn.microsoft.com/en-us/library/aa544234.aspx.

    Frankly, this is a new one to me, but it makes sense.

    M.

  2. Henning, I called Marc to the rescue and as you can see it didn’t take him long to come back to me with the answer. Click the above link to read his blog post.
    Even better, the reference he provides in his post shows a better scenario than the default SharePoint view: how to handle situations where the user is:
    - either assigned a task based on membership in a group
    - or assigned a task directly:

    <Or>
      <Membership Type=\"CurrentUserGroups\">
        <FieldRef Name=\"AssignedTo\"/>
      </Membership>
      <Eq>
        <FieldRef Name=\"AssignedTo\"></FieldRef>
        <Value Type=\"Integer\">
          <UserID/>
        </Value>
      </Eq>
    </Or>
    

    Marc, thank you so much!

  3. Hi Christophe, I installed the webpart but no tasks are listed, is it possibly due to the fact I am using a french Sharepoint (field names problem?) Thanks

    • Patrick, I think you’re correct: you’ll need to convert the names to the French equivalents. Make sure you use the internal names btw. You should get the correct names by opening a tasks list in SharePoint Designer and converting it into a Data View.

    • patrickemin
    • July 12th, 2010

    Hi, no luck so far… French équivalent are for example “Tritre” for “Title” or “Echéance” for “DueDate”. I guess internal names are in english (Title for example). Has a french Sharepoint user succeeded with this webpart? We badly need it… ;) Thanks!

    • patrickemin
    • July 12th, 2010

    Ok, internal names in a french SharePoint are logicaly english names, that is “Title”, “Status”, and so on… I’ll test on my site while waiting for an advice from LinkedIn, thanks.

    • patrickemin
    • July 13th, 2010

    Everything is working now (on a french site). Now I need to tweak the Query clause, but what text editor to use? Part of the code in Notepad++ appears ok but the Select statement is displayed with HTML codes like &amp…etc and it’s too dificult to edit like that. What editor do you use? Thanks.

  4. Update on patrickemin’s questions (who got everything working):
    - It seems that all languages use the English internal field names, so it it not too difficult to tweak the code for non-English languages.
    - Once the Web Part is on the page, the layout can be modified with SharePoint Designer, like any Data View Web Part.
    - the query clause is harder to tweak. You’ll need to go in code view in SPD, or build your own data source from scratch.

    • Kerri
    • September 1st, 2010

    Hi Christophe, I’m having trouble and I was so very much looking forward to seeing yet another of your brilliant solutions fix my problems! I’m using OotB task lists with the addition of a ‘project’ column, 3 subsites same templated task list, there are no tasks on the main task list. Does it have to be on the page with this web part? I see the web part, but no tasks. When you say ‘tweak’ it, do I have to tweak it to to make it work or is it meant to work upon download and import? My task lists on all sites are grouped, does that make a difference? Thanks for any help.

    • What you get is a Data View Web Part in cross-list mode. There is nothing else to add, it should just work when you import it to the page. The Web Part directly queries the database, it doesn’t care about how the individual task lists are rendered (grouped or other). The only requirement is to use standard Tasks lists (not project tasks, custom lists or others).

      Your custom “project” column however will not be included in the query. For this you’ll need to become a Data View Web Part expert and build yours from scratch!

        • Kerri
        • September 5th, 2010

        Ah, Task list, not Project Tasks. That was the problem. Worked like a charm when I switched those out. Made for a great presentation. Thanks Christophe!

        • Good to hear you worked it out!

          I plan to update the toolkit to accept other lists, like project tasks. I’ll also include KPIs.

    • Dean
    • September 21st, 2010

    how can i show the original subsite for each task in the rollup? i have meeting workspace subsites and would like to show the incompleted tasks from each, but I can’t figure out which field to include

    • Dean
    • September 21st, 2010

    How can i add custom fields that I have added to the Task lists to the rollup?
    Thanks

    • If you have custom fields, you’ll need to start from scratch and build the cross-list DVWP in SharePoint Desgner.
      Alternately, you can try opening the Web Part in a text editor, locate the fields list, and add yours. Risky, and you’ll need to know both the display name and the internal name.

    • SP10
    • September 23rd, 2010

    Can we get the Tasks from Sub-Subsites with this webpart, like I have meetings site under root site in that meetings site i have few subsites. Can I get tasks from those sub-subsites?
    Because i was trying to use the regular OOB dataview webpart and using connect to another library option in designer nd trying to add the tasks list from the subsites. I was able to add from the subsites by staying at root site but not from Sub-Subsites.
    I am using MOSS 2007 and SPD 2007.

    • The Web Part works in crosslist mode, and will collect all the tasks from the current site and its descendants, no matter how many levels you have. Try it! It just takes a couple minutes to install it.

  5. Hi, should this roll up tasks work the same in SP2010 and SP2007, cause we migrated to SP2010 and the webpart does not display anything now, thanks.

    • The roll-up is a Data View Web Part. Did your migration involve other DVWPs, and did they do well in the migration?

  6. Hi Christophe, I guess we have only this one, so I could’nt tell if the migration went well, do you have any other users comments on that *possible* incompatibility?

    • No, I don’t have any other users comments, but there are so many migration tools… Which one did you use? And did you ask the provider about DVWP upgrades?

  7. After investigating, here is how we got the thing to work in 2010: we created an empty data view in SPD2010, then copy and paste independantly the data source part and the XSL part of the SP2007 rollup webpart, and that was it!

    • Right, Microsoft has carried the DVWP over to the 2010 version, only the wrapping has been updated.
      As I told you by e-mail, I have added a new page to the SharePoint User Toolkit for SP 2010:
      http://sp2010.pathtosharepoint.com/SharePoint-User-Toolkit/Pages/SP2010-Tasks-Lists-Rollup.aspx

    • Patrick and Christophe:

      If you’re doing a standard upgrade from 2007 to 2010 (if there is such a thing!), the DVWPs which you have in place in your pages *ought* to simply go along for the ride and also be in place in 2010. I doubt that anyone has a lot of experience upgrading 2007 instances that have a lot of DVWPs to 2010, but I’ve done some. All of the DVWPs in the installation upgraded fine in the database upgrade process. What I mean by this is the standard Microsoft database upgrade process, no third party tools involved.

      The DVWP in 2010 is identical to the one in 2010, so there shouldn’t be issues. The one place I saw a problem was where I had some CAML which wasn’t actually valid because it referenced a column which didn’t exist. In 2007, that DVWP rendered just fine. After the upgrade to 2010 the DVWP wasn’t visible in the page. By opening the page in SharePoint Designer 2010, I was able to see that the DVWP was actually still in the page, but marked as Hidden. I was able to fix the issue and display the DVWP again.

      Hope this is helpful.

      M.

  8. Here’s another option for rolling up task data, both the full hierarchy and across multiple task lists. It also supports CAML query, but hides it from the user. Basically you select a view to use and type an ad hoc search into a text box. IntelliGantt translates it into a CAML query.

    http://www.teamdirection.com/igwebpart

    • John, This Web Part looks interesting. However, the main point of my solution is that it works out of the box, and doesn’t require any server side installation.

    • Paul Bedford
    • March 7th, 2011

    Hi Christophe

    Thanks (again) for sharing your efforts with the community. I was wondering if you had updated your roll-up creator UI to allow specifying a specific list type (OOB or custom)?

    I am looking for a simple way to create roll-ups from a number of lists.

    Thanks once again?

    Paul

    • Unfortunately, it’s not that simple, as each list type has its own column names. To make it work for any list, you’ll need to learn how to build the roll-up in SharePoint Designer.

    • Chris
    • April 6th, 2011

    For some reason I cannot get Tasks to display. I have 2 different Sharepoint Servers I put the web part on and no tasks appearing. SP 2007 SP2. Using Task list on main site and sub-sites.

    Code from here: http://www.pathtosharepoint.com/sharepoint-user-toolkit/Pages/Tasks-Lists-Rollup.aspx

      • Chris
      • April 6th, 2011

      Nevermind I did not notice the Filtering. Blind…

    • Rosemary
    • June 10th, 2011

    Christophe, this is great but is there any way the Site Name can be identified or sorted on? I see the URL available but not the site name. Since some sites will have tasks named the same or with similar titles (Complete the Project Charter, e.g.), we need a way to distinguish which site the tasks are coming from.

    Thanks for all of your help.

    Rosemary

    • I am in the same boat, only having access to the URL, not the site name. The trick I used in my demos was to parse the URL to extract the site name.

    • Therese
    • September 29th, 2011

    Hi, Cristophe. I ahve downloaded the webpart and added it to the gallery. However, when I attempt to plac eit on a page. I get an error saying it is not valid, to check that it is a .webpart or .dwp and that it contains well formed XML. What am I doing wrong?

    Thanks!

    • Anonymous
    • October 4th, 2011

    Hi,
    I have install it in a french site and the webpart is not working. I read the comments of patrickemin and i saw that he managed to make it work. Could it be possible to get the code of the webpart or to explain a bit better how did he do it?
    thanks in advance
    .

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 )

Connecting to %s

Follow

Get every new post delivered to your Inbox.

Join 214 other followers