Project Server 2013
Project Server 2010
Take 2 – just in case you thought you saw this post coming earlier…
I’ve had a few questions recently around the behavior of timesheets in Project Server 2010 and 2013 (and Project Online) when projects, tasks or assignments are deleted. Some of this relates to bugs – other behavior is expected, and it is different if single entry mode is enabled. Thanks to Shazeb Khan, Michael Wharton, Elli Johnston and Randy Slycord for some of the questions and answers that led to this posting – and skip to the And finally section at the bottom for a timesheet status bug we are looking to fix..
Firstly it is worth reviewing the article on TechNet Best practices for submitting and reporting on actual work, which, although written for 2010 is still applicable for Online and 2013. That suggests using Single Entry Mode – but I will go on to explain what happens if it is enabled or not.
First with Single Entry mode, and I’m looking specifically at Project Server 2013 – I’ll mention where 2010 differs from this behavior... For this example I have just a couple of projects, three timesheets; one approved, one submitted and one saved. Each has lines from each plan – then I delete one of the plans…
What happens next is a little like Schrödinger's cat – the lines in some of the timesheets are still there – as long as you don’t try to observe them (well not a perfect analogy as you can look in the database – but mentioning a cat in the blog must push this up the page ranking!). In the database (reporting schema) we see that the Approved lines are still there (TimesheetLineStatus = 1), the pending lines are still pending (0) and one of the Pending Approval lines is now rejected (2) with a comment of “The timesheet has been rejected because it contained at least one task from a project that has been deleted.”
If I look at the MSP_TimesheetActual table I still see all 30 rows (5 entries for each of the 2 plans for 3 weeks). Now I’ll open my timesheet…
Remember I mentioned a bug? Well here it is. Clicking OK gives ‘An unknown error has occurred’.
This will be fixed in the April 2014 Cumulative Update for Project Server 2013. This will also cause an issue in the Approval Center – giving an error ‘One or more categories of approval could not be loaded’. Thanks Michael Wharton for asking about this message – the term categories is not referring to anything like the Project Server categories – just being used generically.
I can recall my timesheet and then remove the Rejected line and resubmit.
For the timesheet that was just saved I currently see slightly different behavior between 2010 and 2013. In 2013 I still see the line for my assignment to the deleted project. And I can re-save – but if I submit my timesheet then I get an error. This is also related to the April 2014 fix.
In 2010 the database almost looks the same, but I did notice something I hadn’t seen before – and haven’t had a chance to check for any different settings – but I have 42 actual lines rather than 30 – I see line entries for the weekend – zero hours as I might expect – but these aren’t seen in 2013. If I look at the timesheet that was saved and not submitted the assignment to the deleted project no longer shows, but it is not until I save that the line is removed from the database (this is the Schrödinger's cat part). So if you are reporting on the timesheets you may still see lines for plans that have been deleted – if the user has not opened and saved the current timesheet after the plan was deleted. The lines are still there – unless you look at them. Even the pending approval lines can appear to disappear – as the change in status to rejected may also throw out your reports for lines that had not been approved – if you are using the TimesheetLineStatus field. This was a conversation from the Project Conference with Elli Johnston as it appeared from reports that we were deleing lines – but it was just a change in status (and this was not single entry – so I’ll look at that next…).
The main difference in single entry mode (apart obviously that the submission of the timesheet does not send status updates) is how the deleted assignments are handled. First 2010. If I follow the same steps as above then instead of the timeline disappearing it get changed, and in place of the project name I see Personal Tasks. Again, not until I save this do I see any change in the database – which still shows the line as pending…
Once I do save however, I will see the TimesheetLineStatus change to a 3 (Not Applicable). This was the specific change that was occurring in Elli’s scenario making it look like line were disappearing from reports – but it was the status had changed. If the timesheet has been submitted or approved then the project name is kept and the status stays good (1).
In 2013 currently the deleted assignment is still present in the timesheet and has a status of 4 (Pending Approval) – this feels like it is part of the bug mentioned above as I’d expect the same behavior as 2010 – I’ll review once I have the April CU loaded and update this posting.
Another condition we have seen with timesheet status (not line status) in Project Server 2013, not related to deletion of projects, is that you can get the wrong timesheet status value in the reporting tables under certain conditions. An approved timesheet should show the status of 3, but this is being reset to 0 when status is accepted against tasks in the timesheet. It is a timing issue, and if the status update is processed before the timesheet approval then all is good – so this could be a workaround if you are hitting this problem. This only happens in Single Entry Mode. This doesn’t affect the display of the timesheet status in Manage Timesheets (which gets its status from the pub schema) – just reporting (coming from the dbo schema). Thanks to Randy and the Sensei team for pointers on this one, and to Shazeb for suggesting the topic worth blogging. This is in the queue for a hotfix but I don’t have a schedule yet.
Cats were neither harmed nor not harmed during the preparation of this blog post.
Brian: when you say, "It is a timing issue, and if the status update is processed before the timesheet approval then all is good," consider the popular case where everyone is their own timesheet approver. It's impossible for these not to be incorrect.
I can now attest to it.
But what about the timesheet line status issue? I'd like to know if this is also on your bug fix radar. Detailed discussion on this can be found on this forum post: http://social.technet.microsoft.com/Forums/en-US/projectserver2010general/thread/a94a5764-8ae9-4a9c-b7fe-19b3cdd275af/#93581170-2177-43cc-ae98-b68c5359a4b7
To Gary's point - one option might be to send status first, then once you know the update has been accepted you can send final timesheet. I appreciate this is messy. I'll also look into other options. One possible one that I know you are all thinking is
just update the dbo schema tables with the correct values from the pub schema - and this might be one of those occasions when I'm ok with touching the DB... (Others may disagree). And to Elli's point the line status getting changed to 'Not applicable' isn't
(yet) considered a bug, but certainly talking through with you and appreciating the effect it can have on reporting certainly makes me open to considering it a bug - but then I don't get the final call on this one as far as fixing it (and the workaround of
allowing for this scenario in your reports would be the push back - once you know it is happening). I'm interested to see how all this behaves with the April 2014 CU as far as 2013 is concerned - and that may impact the likelihood of any fix in this area.
I hope than answers you question Elli - although I know it is a bit wooly. Brian.
Also Elli - I am reviewing the forum thread - I think the post above only covers some specific scenarios that are throwing your report out, I'll see what else I can find. Brian.
Brian, in this case the report is not a trivial bi-product, but an essential management tool. If you run timesheets, you need to be able to monitor compliance, making this a high-impact issue.
Has the bug noted in the "And finally" section been added to a hotfix yet?
Hi Adrienne, this looks to be in the pipeline now for the June CU 2014 - due to ship 10th June.Best regards,Brian.
Thanks very much for your quick response, Brian!
is the ‘One or more categories of approval could not be loaded’. error fixed in the April CU or is that still pending?