Showing posts with label Timesheets. Show all posts
Showing posts with label Timesheets. Show all posts

Saturday 17 December 2011

Timesheet Blog Series Fix

Part 1 - Design & data storage
Part 2 - Building the UI
Part 3 - Installation Steps
Part 4 - Final Part
Part 5 - This Post - Caveat to watch out for

Problem: Popup pages for the Timesheet application throw an application error (500 error), the uls log refers to the ribbon tab object not being being available.

Initial Hypothesis:  Ensure the popup pages, that use the Dialog framework are of type web part pages.

Resolution:

More Info:
http://ranaictiu-technicalblog.blogspot.com/2010/06/ribbon-tab-with-id-has-not-been-made.html

Timesheet Post Series:
Part 1 - Design & data storage
Part 2 - Building the UI
Part 3 - Installation Steps
Part 4 - Final Part

Tuesday 5 April 2011

Timesheet for SharePoint 2010 CodePlex project

Overview:  I have a lot of people looking for a timesheet solution for SharePoint 2010 as I have 4 posts on this blog about timesheets for SharePoint.  I get some great pointers and requests so I think it is time to make this a codeplex project.
Objective: To make a plug-in for SharePoint that will allow users to fill in timesheets.  I recon a sandbox solution is a good idea with SharePoint Online on the horizon in the next few months.  I want to provide 2 storage providers for the data: SQL Server and AZURE.
Wanted: As a starting poing I am going to add my code onto CodePlex in the next week and hopefully some folks want to build this as a community project.  If you are interested in helping out please drop me a line.  I need C# coders & front-end devs (someone to be in charge of the UI would be great), testers, documenters, ideas.  So if you want to join the project you can twitter me at @paulbeck1 and I'll add you to the codeplex project pre-launch.
http://twitter.com/#!/PaulBeck1
Part 1 - Design & data storage
Part 2 - Building the UI
Part 3 - Installation Steps
Part 4 - Final Part

Wednesday 19 January 2011

Timesheet solution for SharePoint 2010 - Part 4 Application setup guide

Part 1 - Design & data storage 
Part 2 - Building the UI
Part 3 - Installation Steps
Part 4 - Final Part (This blog post)

Overview: Once the Timesheet wasp is installed, the new Timesheet database and the web.config changes have been made as described in Part 3 (Timesheet Installation), you need to add pages for users to input there timesheets and administration.  You will need to create at least 1 client, 1 project and add a person to a project before you can submit timesheets. 

Add pages to the Timesheet application within SharePoint 2010:
I create a "new publishing site" called "Timesheet" with the following url http://intranet.dev/timesheets/Pages/default.aspx.
I then added the following web parts to the page:
All the web parts are connected web parts (To connect the web parts, when the page is in edit mode,click the button to edit).
Create the popup page that is linked to on the page just created.
Ensure that the "New task" & Edit task links are working.
Create a new Administrators page, add the "Admin - Main" web part to the page.
Check the following 3 web.config settings and create the appropriate pages, each page has 1 web part as shown below.
Ensure all the popups work from the main administration page.

Part 1 - Design & data storage 
Part 2 - Building the UI
Part 3 - Installation Steps
Part 4 - Final Part (This blog post)

Monday 17 January 2011

Timesheet solution for SharePoint 2010 - Part 3 Installation

Overview:  Download the visual studio 2010 solution.  This contains the code to implement the timesheet application within SharePoint 2010.  The instructions give step by step actions to get the full timesheet application working.

Related posts in this series:
Part 1 - Design & data storage
Part 2 - Building the UI
Part 3 - Installation Steps  (This blog post)
Part 4 - Final Part


Simple Instructions for Timesheet deployment
==================================
You require a web application that contains a site definition, I used a new web application (http://intranet.dev/) with a Publishing Site as the site template for the root site collection.
1. Download PaulB-Timesheet.wsp (save it to the server/local machine, I put PaulB-Timesheet.wsp on the e drive for this post)
2. Open Powershell with SharePoint commands:
3. Install the wsp and activate the feature using Powershell (PS) as shown below (text version of the PS commands)

4. Check the feature has been installed correctly on your site
5. Create a new database and popluate it with tables, download the SQL script.

6. Ensure the Timesheet database is created and ensure an account has permissions to access the table for read/write opterations.

7. Edit the web.config files on each Web Front End SP2010 Server (this should be changed to a feature receiver).  The connection string below uses windows trusted and will pass through each users Windows identity, it will generally be easier to user a dedicated connection string account as it saves on SQL Server permions being required for each user.

To complete your setup you need to configure your timesheet application per part 4 - Seed data & page creation.
Summary:
This will be sufficient for most standard requirments however, it is preferable to implement logging to the ULS and your own logging mechanism if it exists.

The areas I would customise on a SharePoint custom deployment would be:
  1. Assemly and wsp solution naming;
  2. Add logging to error handling;
  3. Rename lables;
  4. Potentially add custom fields or logic to the application to meet specific business requirements.
Instructions for Timesheet deployment using Visual Studio 2010 (Advanced option)
===============================================
Download the Visual Studio 2010 project:
PaulBeck.Timesheet.zip (version 1 - 820 KB), unzip the files and place on you development machine.
1.> Build and deploy solution to SharePoint farm.  The Visual Studio 2010 project has the following structure.

2.> Run the Script\timesheet-script.sql file in a SQL instance (Creates the db).
3.> Change the web.config to contain the app setting connection info for timesheets.
Configure your Timesheet Application
4.> Add the "Timesheet - Consultant", "Week", "Timesheet - UserProjects" & "Timesheet - BookTime" web parts to a new page.
5.> Connect "Timesheet - Consultant" to "Timesheet - Week" & "Timesheet - UserProjects", then connect "Timesheet - Week" to "Timesheet - BookTime" web part.
6.> Create another page called "Timesheet Add or Edit" i.e. "Timesheet-Add-or-Edit.aspx" (set in the web.config) and add the "Timesheet - BookTimeItem" web part to the page.
7.> Add the Admin screens by:
7.1.> Create a new page named "Timesheet Admin Main", add the following web part to the page "Admin Main".
7.2.> Create a new page named "Timesheet Admin Client", add the web part "Admin - Client" to the page.
7.3.> Create a new page named "Timesheet Admin Project", add the web part "Admin - Project" to the page.
7.4.> Create a new page named "Timesheet Admin Project Resources", add the web part "Admin Resource Allocation" to the page.

Part 1 - Design & data storage
Part 2 - Building the UI
Part 3 - Installation Steps  (This blog post)
Part 4 - Final Part

Timesheet solution for SharePoint 2010 - Part 2 UI

Problem: Using the database design from Part 1, I need to create the UI for users to submit timesheets.  The screen to capture the users timesheet looks like this:

Related posts in this series:
Part 1 - Design & data storage
Part 2 - Building the UI(This blog post)
Part 3 - Installation Steps 
Part 4 - Final Part

Part 2 Continued...

Initial Hypothesis:  Create 4 connect web parts to allow users to submit their timesheets weekly.  Also allow site collection administrators to submit timesheets for users.  The web parts will also allow administrators to approve or reject the timesheet.
Resolution: Create 4 connected web parts to display user timesheets on a page.  Use the dialog framework to add and edit tasks.  The ability to add a new task is done in another web part on a separate page.  The edit task allows users to edit or delete and existing task, this is another custom web part place on a separate page within the site collection.

Create a web parts to perform basic administration options.  I have create 3 administration web parts within Visual studio to allow administrators to update key timesheet information such as adding new client or projects or assigning people to a project.

Reporting for the timesheet can be created using either: Reporting Services and integrated into SharePoint, BCS to query data, or custom web parts.
Part 1 - Design & data storage
Part 2 - Building the UI (This blog post)
Part 3 - Installation Steps 
Part 4 - Final Part

Timesheet solution for SharePoint 2010 - Part 1

Part 1 - Design & data storage (This blog post)
Part 2 - Building the UI
Part 3 - Installation Steps
Part 4 - Final Part

Problem:  A common requirement on Intranets is to have a timesheet template on SharePoint.  There are solution for company timesheets.  I wanted to build a timesheet application that was scalable, reportable and friendly for SharePoint. 

Initial Hypothesis:  There are timesheet solutions for SharePoint and most are portable to SharePoint 2010.  Often the timesheet solutions integrate with Outlook as well.  If you have outlook this is often the best solution as users seem to accept Outlook based solutions fairly easily.

I came across http://www.pointbeyond.com/, there timesheet solution was built for WSS3/MOSS, this looks like a solid solution based on SQL Server so their is no real reliance on SharePoint lists however, SharePoint surfaces the timesheets, administration and reporting requirements.  I have not implement the solution but it appears solid and expandable.

In WSS3 I think it would be very difficult to build a detailed timesheet application based on SharePoint lists due to the list size issue and the list relationship complexity required for a timesheet application.

Resolution:  I want a SharePoint Foundations solution that can be used on all SharePoint 2010 farms that can capture and administer timesheets for a business.  SPMetal has greatly improved application development when using SharePoint lists to store data in SP2010 however, due to the number of relational lists and the support for transactional CRUD operations I believe it is better to use SQL Server and store the data in relational tables.  Custom connected web parts will allow users to enter their weekly timesheets.  The solution allows for the use of BCS and External Content Type (ECT) in SP2010 for administration and reporting.

The data access technology choice is between Linq to SQL and using the Entity framework 4.0.  As SharePoint 2010 supports .NET 3.5, a separate Visual studio project/business layer would be required.  Additionally my take on these 2 competing Data access technologies is, if it's simple then use Linq to SQL, if it's complex and could change down the line use the entity framework.  I choose to use LINQ to SharePoint as I am using 7 tables to store all my timesheet task related data.  Below is the Entity Relationship Diagram (ERD) for the timesheet application.


Part 1 - Design & data storage (This blog post)
Part 2 - Building the UI
Part 3 - Installation Steps
Part 4 - Final Part

More Info:
Updated: 25/02/2011 Laura Rogers wrote this article on the time card that is useful.
http://www.sharepoint911.com/blogs/laura/Lists/Posts/Post.aspx?ID=113