none
project server 2010: cant delete a time reporting period RRS feed

  • Question

  • Hi,

    I have a time reporting period that I am not able to delete. When I go to the PWA -> Server Settings -> Time Reporting Periods, I select the period I want to delete but the delete button is disabled. When I go to the PWA -> Manage Timesheets, I find the time period I want to delete here but it is not yet created! Its status is "Not Yet Created". When I go to the PWA -> My Work -> Timsheet and then select the period I want to delete, I am able to see the timesheet but it doesnt contain any data (Im the administrator). I am able to insert row, send status, send timesheet, etc...

    What is happening here, I do not have the timesheet created in the Manage Timesheets but I am able to see it in the My Work -> Timesheet and I can't delete the time reporting period of this timesheet. Is this how it is supposed to be?  Can anyone guide me as to how I can delete this time reporting period?

    Thanks,
    George

    Saturday, August 20, 2011 8:20 AM

Answers

All replies

  • George,

    As you mention you can go to My Work -> Timesheet and see an empty timesheet for the period, this indicates you have one created somewhere. The timesheet page uses different views, so you may have a view that is not showing the period.

    To be able to delete the period, you need to make sure you have no timesheets created for any users. The easiest way to do this is to run the following query against the reporting db:

    SELECT r.resourcename,
     t.[TimesheetUID]
       ,t.[PeriodUID]
       ,t.[TimesheetName]
     FROM [PWA_Reporting].[dbo].[MSP_Timesheet] t
     inner join MSP_TimesheetPeriod p on t.perioduid = p.PeriodUID 
     inner join msp_timesheetresource r on t.OwnerResourceNameUID = r.ResourceNameUID 
     where (p.StartDate = '<Period Start Date>' and p.enddate = <Period End Date>)
    
    

    If you find a timesheet existing, either logon as that user, or delegate into them, delete the timesheet via the My Timesheets capability, then try to delete the period.

    Hope this helps,


    Alex Burton
    www.epmsource.com | Twitter
    Project Server TechCenter | Project Developer Center | Project Server Help | Project Product Page
    Saturday, August 20, 2011 9:33 AM
    Moderator
  • Hi Alex,

    Thanks again!

    I ran the query on the reporting database and it returned an empty table!!! I still can't delete the time reporting period. Might this be a bug in project server? Do you have any other suggestions.

    Thanks,
    George

    Saturday, August 20, 2011 9:56 AM
  • George,

    Let me spin up a new PS instance this evening. I'll see if I can get a repro :)

    Alex.


    Alex Burton
    www.epmsource.com | Twitter
    Project Server TechCenter | Project Developer Center | Project Server Help | Project Product Page
    Sunday, August 21, 2011 5:09 AM
    Moderator
  • Hi George,

    I tried this on a fresh PS 2010 instance this evening and followed the steps above. After deleting the already created timesheet, PS allowed me to delete the period without issue via Server Settings.

    Are you 100% sure all the timesheets associated with the period are deleted?

    thanks,

     


    Alex Burton
    www.epmsource.com | Twitter
    Project Server TechCenter | Project Developer Center | Project Server Help | Project Product Page
    Sunday, August 21, 2011 10:43 AM
    Moderator
  • Hi Alex,

    Again thanks for your help! Yes I am sure I have no timesheets associated with the period. However, I recall deleting a project previously from the database directly instead of project server since I had many problems deleting it from project server. I don't know if this has something to do with my current problem. Please read this thread http://social.technet.microsoft.com/Forums/en-US/projectserver2010general/thread/97a7daed-0725-455a-ab5d-3db7209b67a6 and inform me if you believe this is caused by what I perferomed in the link above and how can I resolve this problem.

    Thanks,
    George

    Monday, August 22, 2011 5:18 AM
  • Suggestions:

    1. Try deleting some other unused timesheet period. Does it work?

    2. Check the other databases for timesheets for that period by any user,

    3. check the timesheet Approvals page

    I dont think the deleted project should cause this problem.

    Friday, August 26, 2011 10:51 AM
  • George,

    Apologies for the delay in responding, it's been a crazy week.

    I am wondering if that issue you had above has left something behind the scenes. It might be worth raising a MS support ticket as I am pretty sure you are going to need to do open heart surgery on the published db in the near future.

    Alex.

     


    Alex Burton
    www.epmsource.com | Twitter
    Project Server TechCenter | Project Developer Center | Project Server Help | Project Product Page
    Saturday, August 27, 2011 8:08 AM
    Moderator
  • Hi Geo_d

    When you say " I have no timesheets associated with the period" you mean for you as a user or for your entire organization? If any one user has a timesheet on this period then it can't be deleted.

    The fact that you look at Manage Timesheets page implies that you don't understand when you act ad an administrator and when you act as a private user. Manage Timesheets is not about the period - it's about your own private timesheet as a team member against this reporting period. "Not Yet Created" doesn't mean that the period wasn't created - it means that your private timesheet as a user wasn't created against this already created period.

     

    Hope it clears something.

    Barak

    Saturday, August 27, 2011 7:10 PM
  • Hi Barak,

    Thanks for the clarification. I'm sure this is not caused by any user having in the entire organization having timesheets associated with the reporting period. Because as Alex suggested in his first post, I have run this query on the reporting database:

    SELECT r.resourcename,
    t.[TimesheetUID]
       ,t.[PeriodUID]
       ,t.[TimesheetName]
    FROM [PWA_Reporting].[dbo].[MSP_Timesheet] t
    inner join MSP_TimesheetPeriod p on t.perioduid = p.PeriodUID
    inner join msp_timesheetresource r on t.OwnerResourceNameUID = r.ResourceNameUID
    where (p.StartDate = '<Period Start Date>' and p.enddate = <Period End Date>)

    and got no returned rows which means I have no timesheets associated with the time reporting period in the entire organization. Any other suggestions much appreciated.

    Thanks,
    George

    Monday, August 29, 2011 6:42 AM
  • I would follow Andrew's advice and open a ticket.  If you have deleted a project directly from the DB then there could be some remnants somewhere that are stopping things working.

    What process did you use to delete the project from the DB?

    Best regards,

    Brian.


    Blog | Facebook | Twitter | Posting is provided "AS IS" with no warranties, and confers no rights.
    Project Server TechCenter | Project Developer Center | Project Server Help | Project Product Page
    Monday, August 29, 2011 5:17 PM
    Owner
  • Hi Brian,

    I used this query to delete the project:

    use <ProjectServerPublishedDatabase>
    delete MSP_TIMESHEET_ACTIONS
    where TS_LINE_UID in (select TS_LINE_UID from MSP_TIMESHEET_LINES
    where PROJ_UID in ('Project UID that is provided in the error message under projectuid’) and TS_ACTION_ENUM = 1)

    Hope this query does not mess things up!

    Thanks,
    George

    Thursday, September 1, 2011 6:51 AM