Installed successfully, not showing up

Apr 12, 2010 at 10:04 PM

Hello, I installed the GraceHunt.SharePoint.Features.CompleteTask solution successfully, however it's not showing up for the type of tasks list I have.

I narrowed it down to only appearing for the following tracking lists: Tasks, and Project Tasks.

However, a lot of my project sites were built using the IT Team Workspace application template from Microsoft, and they use a custom list called Project Tracking - Project Tasks List.

Unfortunately the "Complete Task" option does not appear for this type of list.  Is there anyway I can add it?

Here's an example of what I'm referring to:

Coordinator
Apr 13, 2010 at 1:51 PM

Thanks for the interest in the project, as well as the well documented request.

The GraceHunt.SharePoint.Features.CompleteTask solution is specifically scoped to both the Tasks and Project Task list templates, as you have seen. The Project Tracking - Project Tasks List, which comes with the IT Team Workspace site, has a different list template identifier altogether.

You could expand the solution out, or, create your own new solution with a new Custom Action, and scope that custom action to a RegistrationID of 7142. I actually just put together a quick blog post about locating the List Template ID based on this question - http://gvaro.spaces.live.com/blog/cns!B06529FD3FC75473!1185.entry

I have a slide deck up and code samples available from a recent Code Camp which I spoke, where I delivered a session on Creating Custom Actions within SharePoint at available on my blog here: http://gvaro.spaces.live.com/blog/cns!B06529FD3FC75473!1175.entry - If you are looking to write your own custom actions, it is a good place as any to start. I also have quite a few other resources on my blog on the topic of Custom Actions as well.

If you look in the manifest.xml file, included within the source from this project release, you can view how there are two custom actions defined, which point to the tasks list (107) and the gantt tasks/project tasks (150) list template identifiers:

<CustomAction Id="GraceHunt.SharePoint.Features.CompleteTask.Tasks"
                RegistrationType="List"
                RegistrationId="107"
                Location="EditControlBlock"
                Sequence="250"
                Title="Complete Task"
                ImageUrl="/_layouts/images/chkmrk.gif">
      <UrlAction Url="javascript:window.location='{SiteUrl}/_layouts/GraceHunt.SharePoint.Features.CompleteTask/CompleteTask.aspx?ListId={ListId}&amp;ItemId={ItemId}&amp;Source=' + window.location"/>
    </CustomAction>

  <CustomAction Id="GraceHunt.SharePoint.Features.CompleteTask.GanttTasks"
                RegistrationType="List"
                RegistrationId="150"
                Location="EditControlBlock"
                Sequence="250"
                Title="Complete Task"
                ImageUrl="/_layouts/images/chkmrk.gif">
    <UrlAction Url="javascript:window.location='{SiteUrl}/_layouts/GraceHunt.SharePoint.Features.CompleteTask/CompleteTask.aspx?ListId={ListId}&amp;ItemId={ItemId}&amp;Source=' + window.location"/>
  </CustomAction>

Expanding this so that it works with the Project Tracking - Project Tasks List, would be as easy as copying and pasting another Custom Action into that manifest.xml file, configured as such, modifying the Id and the RegistrationId attributes. Re-packaging the solution, and re-deploying it.

<CustomAction Id="GraceHunt.SharePoint.Features.CompleteTask.ITTeamTasks"
                RegistrationType="List"
                RegistrationId="7142"
                Location="EditControlBlock"
                Sequence="250"
                Title="Complete Task"
                ImageUrl="/_layouts/images/chkmrk.gif">
    <UrlAction Url="javascript:window.location='{SiteUrl}/_layouts/GraceHunt.SharePoint.Features.CompleteTask/CompleteTask.aspx?ListId={ListId}&amp;ItemId={ItemId}&amp;Source=' + window.location"/>
  </CustomAction>

I hope this helps! Please let me know if you have any more questions on the project, and I'd be happy to assist.

Apr 14, 2010 at 3:18 AM

Just wanted to say that your reply was VERY helpful! 

With the information you provided, along with the posts you linked on your blog... especially the video with detailed instructions on how to create a custom action... led me to my first attempt into VS and a successful solution deployment!

Thanks!

Coordinator
Apr 14, 2010 at 1:39 PM

That's great news! Glad I was able to help, and get you into VS with a successful SharePoint solution deployment!