Search for Help
< All Topics
Print

Overview

This script creates empty timesheet entries each month for each member of Speakeasy staff. The staff member can populate the timesheet with details of time booked to projects, and/or any associated expenses, before submitting it for review and approval at the end of the month.

Where to Find It

Name of runbook: CreateMonthlyTimesheetEntries. Note: the name will also have the version of PowerShell that the script is using. e.g. if the script uses PowerShell V51, then the name would be “CreateMonthlyTimesheetEntriesV51”.

The script is under source control and can be accessed from the following repository:

Speakeasy Azure Runbook Repository

See the following article which provides an overview, inccluding how to make changes to scripts using git:

See the following document (advanced users only!!) regarding how the script was initially created in the Azure environment:

Creating a PowerShell script in Azure

This script is scheduled to run using a schedule which can be viewed via the following link: MonthlyTimesheetEntrySchedule. The schedule runs monthly, near to the start of the month. The script generates a log file which can be checked for errors. This can be seen here: CreateMonthlyTimesheetEntries log files

How it Works

The script retrieves a list of staff members (contactType=”Staff”) from the “Speakeasy Staff and Volunteers” SharePoint list. For each member, it then fetches their associated Speakeasy email address from Microsoft Exchange, using their name to look this up. The script then creates a new entry in the “Timesheets” sharepoint list and emails the user.
Timesheets calculate project costs using an hourly rate. When the new timesheet entry is created, the hourly rate for the associated staff member is copied from the “Speakeasy Staff and Volunteers” SharePoint list (the “ProjectCurrentHourlyRate” column) to the Timesheets list (“StaffProjectHourlyRate” column). The value in the “Timesheets” list is represents the hourly rate at the time of the timesheet being created – hourly rates can change with time, so the ProjectCurrentHourlyRate in the “Speakeasy Staff and Volunteers” SharePoint list can change without affecting older timesheets.
For testing purposes, the script also generates a timesheet entry for Paul Cashmore. The Timesheets app is configured so that this is only visible when Paul Cashmore is using or testing the app. Also, the Powershell script “Timesheet Status Notification” is configured so that, if any change is detected in the status of Paul Cashmore’s timesheets, only Paul Cashmore is emailed. This enables Paul to test the Timesheets app and associated functions without other user’s receiving email notifications.