Why the PWA Timesheet.aspx page is EVIL (and a quick fix!)

Seriously, never give that timesheet.aspx link to your team members. It’s evil.

When you click on this link (it’s even on the Quick Launch Bar) the system creates a timesheet for the current week by default. So if your staff, like ours, enters time on Mondays, that means they always have to hit the “Previous” button to go back to the week they are submitting time for. Not only does that default make it easy for them to accidentally place work in the wrong week, it also creates a timesheet which is now trapped in time and will not update, even if changes are made to assignments between the time it was created and the day they actually want to submit for that week.

So what should you do instead?  First of all, close your future time reporting periods and don’t open them until the end of the week.

Second, remap that Quick Launch item to the “Manage Timesheets” page. (_layouts/15/PWA/Timesheet/MyTsSummary.aspx)

There’s a couple of reasons this isn’t enough – people love their bookmarks, plus, if the current week is closed and you click on it, you’re stuck with a greyed out ribbon and no forward and back capabilities!

To get around that ugliness, I suggest that instead, you also add a redirect to the timesheet.aspx page using javascript.

What this does is only redirects from the timesheet.aspx page as long as there are no query parameters (stuff in the URL after a ?), which there always are if you create or click on a specific timesheet from the Manage Timesheets page or by clicking “Previous”, “Next”, or looking up a specific date from the ribbon.

All you have to do is add a Content Editor webpart to your timesheet.aspx page and add the following code:
var currentLocation = window.location.href;
if(currentLocation.indexOf(‘?’) == -1){
window.location = ‘/PWA/_layouts/15/PWA/Timesheet/mytssummary.aspx’;


Now go forth and be awesome!



Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s