回答済み Extending the Task List

  • 2012年3月5日 0:29
     
     

    one thing that i have noticed is that the task list in sp2010 does not do roll ups. the 5age complete or dates of parent does not change if ther child is modified.

    i wonder if aneone has been able to enhance the task view list


    MSDNStudent Knows not much!

    • 種類を変更済み MSDN Student 2012年3月5日 2:26
    •  

すべての返信

  • 2012年3月7日 9:09
    モデレータ
     
     
     

    Hi,

    I’m not very clear about your description, about the parent and child item, do you mean the item and items in the item’s Prodecessors field? And modify the child do you mean modify the items of summary task? If so, items here are all unique tasks, change one will not cause summary task to change.

    If I have any misunderstanding, please feel free to let me know, and provide more information about this.

    Thanks,
    Qiao


    Qiao Wei

    TechNet Community Support

  • 2012年3月14日 13:11
     
     
    I mean the tasks under the "summary task" 

    MSDNStudent Knows not much!

  • 2012年3月15日 6:12
    モデレータ
     
     

    Hi,

    Thanks for posting back.

    By default, if you are using Microsoft Project 2010 with SharePoint list, then you can re-sync with in Project, the summary task will reflect the dates and % complete of the sub-tasks. This will not happen to SharePoint automatically.

    If you want to achieve this just in SharePoint, you may consider creating event receiver like ItemAdded, ItemUpdated, ItemDeleted event, calculate and change the relative value through event receiver.

    More information, create SharePoint 2010 event receivers in Visual Studio:
    http://msdn.microsoft.com/en-us/library/gg252010.aspx

    Thanks,
    Qiao


    Qiao Wei

    TechNet Community Support

  • 2012年3月15日 6:58
     
     

    even if I wrote itemadded/modified event.... how will I determine who is the parent (and parent's parent) task under which the currently inserted/modified rows lies? 

    I don't know of a way to determine/traverse that hierarchy.


    MSDNStudent Knows not much!

  • 2012年3月15日 12:05
    モデレータ
     
     回答済み コードあり

    Hi,

    SharePoint API by default doesn’t provide a method to get the summary task of a subtask, in this situation, you may try to hard code to get the relative value, every summary task can be regarded as a folder, you can compare the url of the item to get the parent summary task, here is a code snippet:

    SPListItem item = list.GetItemById(2);
                        string url = item.Url;
                        string folderurl = url.Substring(0, url.LastIndexOf('/'));
                        foreach (SPListItem itemfolder in list.Folders)
                        {
                            if(itemfolder.Url.Equals(folderurl)){
                                Console.WriteLine(itemfolder.Title);//get parent item of subtask
                            }
    

    Thanks,
    Qiao



    Qiao Wei

    TechNet Community Support

    • 回答としてマーク MSDN Student 2012年3月16日 19:20
    •