I am developing my first module and decided that the application I'm building would make a good case study for learning a lot of aspects of Drupal (including cck, workflow and actions), and so I'm putting it here, with an eye towards posting how I've accomplished the various functionalities, soliciting input for how to approach certain aspects of the application (a few of which are stumping me), and finishing up with a demo and/or webcast of the finished product. I will contribute the module, too, once I figure out how to do that :-). Bottom line - we need learners AND experts in this "chautauqua" to make it a real learning experience. So please jump in and follow along, comment, ask questions, and provide expert opinion!
The application is a time off tracker for a business. An employee can fill out a request (time off request node), specifying the date range and the type of time off (vacation, sick, jury, etc.). Before the request node is saved, however, all the non-weekend/non-holiday days in the range must be presented to the employee with the date, hours (defaulted to 8), and type of time off. The employee can edit these (maybe the first day he'll only be taking 4 hours instead of 8, or maybe one day is a jury day). He will then submit the whole lot.
The request is launched onto a workflow. An email notification is sent to his supervisor, who approves or disapproves the request, with appropriate notifications emailed back to the employee. If approved, the request is also forwarded to HR. After the end date of the time off range, an email is sent to the supervisor with a link to a verification of the time actually taken. Again, that window will contain all the individual days off, including type and hours. The supervisor can update any of this, then click "confirm", whereupon a notification will go to HR, and vacation and sick balances will be updated for that employee.
On the backend, there are employee nodes (attached to users) with vacation and sick balances, and ytd totals of other types of time off taken (e.g. jury, bereavement, fmla). When time is taken, these nodes are updated accordingly. If time off is cancelled, or the employee ended up taking less or more time than requested, this needs to be captured.
A number of views are included in the application. "My time" is for the employee, which shows all time off taken for the current year (or other selected years), along with vacation and sick balances. "My team" and "my group" show the same information, but for every member of a supervisor or manager's team or group. An HR view shows all employees.
That's an overall sketch, and there are all kinds of complexities lurking in this. Such as, how do we determine who is in someone else's team or group, or how can a manager or hr enter a request directly on behalf of an employee, or how do we know if a date is a company holiday?
So, that's the sketch. I'm going to approach this case study using comments for each aspect of this that has to be addressed, so we can segregate them into learnable blocks.