I have been involved with doing a nice solution for sub-tasks in sharepoint 2007 and the way we did it is develop a web part to put on the "display form" that queries the task list for items with the "parent task" field pointing at the current displayed task.
Adding that web part to the display form wasn't a problem - just open the form in Sharepoint designer, add a web part zone to the side and drop the new web part there.
Then I wanted to add a web part to the "new task" form, that gets from the querystring which task it should connect to, and set the value to the "parent task" field automatically. To my surprise, I found that if you try to put it on the form, the page crashes with an error.
Before you say "Ishai, you write lousy code" I have to stop you and say I tried adding default sharepoint web parts as well, and the end result of the research is that when you add web parts to a page that has either the "edit" or the "new" list forms - the page will crash.
Whats the workaround? we moved the code from a web part to a web control, and manually added it to the page. Works like a charm, and now we have a viable tasks-sub tasks solution. I will publish what I can of the code after testing.
Creating a new task:

View that task, currently no sub tasks were created:

Click the "Create sub task" link and you get to the "new task" page again:

View the root task again, this time you see the sub task in the side web part:

Another option to create the sub tasks - through a context menu:

1 comment:
I am new to sharepoint, doing a pilot (poc) which one of the requirments is to have subtasks. could you share the code for this?
Post a Comment