Giter VIP home page Giter VIP logo

openskedge's Introduction

OpenSkedge

Build Status

1.2.x-dev

This is a development branch which will contain lots of refactoring of 1.0.x-dev.

Deployment on a Local, VPS/Cloud, or Dedicated host

Requirements

  1. Nginx, Apache, or another web server on *nix/BSD with rewrite functionality. May work on Windows and Mac, but has not been tested and is not supported.
    • Nginx users, see this wiki article for setup.
    • Apache users, point your document root to web/. The .htaccess should take care of everything.
  2. PHP 5.5.x+
  3. PDO-supported database. MySQL/MariaDB suggested.
  4. Composer for installing dependencies
  5. (optional) Memcached and PHP memcache(d) extension.

Installation

  1. Run php app/check.php and resolve any errors before doing ANYTHING else.
  2. Run cp app/config/parameters.yml.dist app/config/parameters.yml
    • sender_email is the email address of the automated email account you want to use.
    • secret is used for CSRF validation. Set this to some random characters. An ideal value would be a random sha256 hash.
    • The rest of the settings should be pretty self-explainatory.
  3. Setup permissions. This will require ACL support of some kind on your file system. Replace www-data with your web server user.
    • If under a host that supports chmod +a:
      $ rm -rf app/cache/*
      $ rm -rf app/logs/*
      $ sudo chmod +a "www-data allow delete,write,append,file_inherit,directory_inherit" app/cache app/logs
      $ sudo chmod +a "`whoami` allow delete,write,append,file_inherit,directory_inherit" app/cache app/logs
    • If under a host that does not, enable ACL support on the filesystem and run the following:
      $ sudo setfacl -R -m u:www-data:rwX -m u:`whoami`:rwX app/cache app/logs
      $ sudo setfacl -dR -m u:www-data:rwx -m u:`whoami`:rwx app/cache app/logs
    • If none of the above are available options, add umask(0002); to the beginning of app/console, web/app.php, and web/app_dev.php
  4. Run php composer.phar install --prefer-dist
  5. Run php app/console doctrine:database:create if you have not already created a database for OpenSkedge.
  6. Run php app/console doctrine:schema:update --force
  7. Run php app/console doctrine:fixtures:load to bootstrap the application with some needed information (groups) and a default admin account with the username admin and the password admin.
  8. Run php app/console --env=prod cache:clear to clear and warmup the application's cache. prod should be replaced with dev if you're running in a development environment.
  9. Run php app/console --env=prod assets:install to install Assetic assets into the web root. prod should be replaced with dev if you're running in a development environment.
  10. Navigate to the OpenSkedge installation in a browser, login as the bootstrapped admin and change the password.
  11. Add employees, areas, positions, and schedule periods and get to scheduling!

Upgrading

  1. Run git pull to fetch the latest changes to OpenSkedge. If you've made changes to OpenSkedge, you'll either want to stash them or commit them and use git pull --rebase.
  2. Run php composer.phar install
  3. Run by using php app/console doctrine:migrations:migrate. NOTE: Only supports MySQL. This should be pretty safe but if issues occur, you should be able to roll back by migrating down. That said, it's probably best to test the migration on your development server before pushing it to production. Read more about using migrations at the Doctrine project's docs.
    • If you're on a database other than MySQL such as PostgreSQL, you'll have to adapt the migrations yourself, or risk potential data loss and/or application breakage by running php app/console doctrine:schema:update --force.
  4. Run php app/console --env=prod cache:clear to clear and warmup the application's cache. prod should be replaced with dev if you're running in a development environment.
  5. Run php app/console --env=prod assets:install to install Assetic assets into the web root. prod should be replaced with dev if you're running in a development environment.

Background Worker / cron jobs

OpenSkedge depends on the use of a background worker or cron jobs to handle things like checking for late employees, archiving time clock records, and dispatching spooled emails.

Running the background worker

This is a naive background worker process using a long-running PHP-CLI process. Historically, PHP has had issues with memory leaks when running for long periods of time, so you may want to either recycle this periodically (using something like supervisord) or opt for using cron.

php app/console openskedge:worker:run - Checks for late employees, prunes old time clock records, and dispatches spooled emails every 10 minutes

Commands for cron

If you're concerned about memory usage with the background worker or need more flexibility in scheduling background tasks, you can also run a few commands on their own & schedule them as cron jobs.

php app/console openskedge:clock:check-late - Checks for late employees

php app/console openskedge:clock:prune --no-interaction - Prunes old time clock records (configured in OpenSkedge settings)

php app/console --no-interaction swiftmailer:spool:send - Dispatches spooled emails. Only needed if Swiftmailer is setup to spool emails (default).

FAQ

What is OpenSkedge?

OpenSkedge is a reinvention of Employee Scheduler, a flexible employee scheduling application designed for companies and organizations (such as education institutions with student workers) which require fluid shift scheduling.

What is OpenSkedge not?

OpenSkedge is not a general purpose, or a one-stop everything-but-the-kitchen-sink scheduling application. It's for assigning positions to people at certain times during certain time periods that they have marked themselves available. It won't schedule your meetings.

Who is behind OpenSkedge?

Max Fierke, a developer and student at the University of Minnesota. He does a lot of other stuff too. He created OpenSkedge during his freshman year. He also has a site you can go to.

License and Copyright

License

OpenSkedge, technically a derivative work of Employee Scheduler, is available under the GNU General Public License version 3 or later. See src/OpenSkedge/AppBundle/Resources/meta/LICENSE for more details.

Authors and Contributors

  • Copyright 2012-2015 Max Fierke (@maxfierke)
  • Copyright 2003 Brigham Young University (For the bits of Employee Scheduler present)

Projects that OpenSkedge uses

Thanks to the following Employee Scheduler developers

  • John Finlay (Developer of Employee Scheduler)
  • Carl Allen (Developed time clock functionality for the UofMN with Joe Krall)
  • Joe Krall (Developed time clock functionality for the UofMN with Carl Allen)

Contact

Max Fierke
Homepage: www.maxfierke.com
Twitter: @m4xm4n
Github: @maxfierke

openskedge's People

Contributors

bitdeli-chef avatar maxfierke avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

openskedge's Issues

Add shift late-ness checks.

Add a listener (probably in the form of a cron job that runs every 15 mins) that checks if a user who is scheduled has clocked in yet. If their shift started 15 mins earlier and they have yet to clock in, email their supervisor that they have not yet clocked in. Do this every 15 minutes until the clock in.

Report Generation

Clock data needs to be moved weekly to an external data store (not the MySQL database) and stored for 4 months or so before it is pruned. The data should be stored by week and reports should be generated in a way where it compares clock data with schedule data, distinguishing between scheduled and worked, not scheduled and worked, scheduled and not worked, and not scheduled and not worked. Backend could be either SQLite, or maybe even MongoDB.

Garreth also asked for something along the lines of employee statistics. E.g. Rank employees by lateness, earliness, frequency of late clock in, etc. See issue #24.

Implement Pagination on index pages

Implement pagination on pages which list records of which their is no real limit to the number of items.

This will introduce some much needed scalability. Right now the index pages will fetch records until they have them all, PHP runs out of memory, or the request times out.

Rethink Position Schedule edit view so that all available users are shown with no duplicates.

In a few recent commits (0f86b3b, 03f6905) I resolved a bug where some users would not show up, even if they were available because of the existence of any schedules for a different position but this introduced another bug where users were shown multiple times in a time slot because the availability schedule was checked twice.

Because this is core functionality, it needs to be resolved before anything else.

Batch User operations

Add controls for batch adding and deleting users. This will likely require more frontend development (jQuery or something) for adding table rows with fields for default data.

Add database-backed application settings

An application settings page should be added which stores a number of global application settings such as:

  • IPs allowed to use time clock functionality
  • Start/end hour for scheduling views
  • Default time resolution
  • Option to enable or disable notification emails by default.
  • Branding name
  • Branding icon

Implement Schedule management

Supervisors should be able to schedule employees in the same manner as Employee Scheduler. This involves showing which users are available for a block of time (15 min, 30 min, and 1 hour resolutions) and allowing them to be checked to schedule. Users should be shown with their configured color as the background and their preference level for a specific time period alongside. Users should be scheduled based on position.

Code Documentation sucks

Due to the speed at which I work on OpenSkedge, the lack of other contributors, and the fact that I generally know my code like the back of my hand, I have failed to provide adequate commenting of my code. This makes the barrier to entry into OpenSkedge rather high as it takes fair amount of analysis of my code before what is being done is as clear as it is to me.

I will make an effort to add more documentation to the code from here on out. This issue will stay open until I have added function, parameter, and return value comments to all methods and go through some of the more difficult logic in some classes and thoroughly document what's going on.

Write a README

Documentation needs to be written for installation, upgrading, and some basic project details. This can be pretty simple.

Along these lines:
0. Run php app/check.php and resolve any errors before doing ANYTHING else.

  1. Give overview of configuration options that should be edited beforehand.
  2. Run php composer.phar install or php composer.phar update depending on if installing or upgrading.
  3. Run php app/console doctrine:database:create
  4. Run php app/console doctrine:ensure-production-settings if running on a production server (NOT RECOMMENDED yet (except for CSOM ITSS))
  5. Run php app/console doctrine:migrations:diff to diff the current database. Run php app/console doctrine:migrations:migrate to update database schema to current schema with mapping and everything.
  6. Run php app/console doctrine:fixtures:load to bootstrap the application with some needed information (groups) and an admin user.
  7. Navigate to OpenSkedge installation in a browser, login as the bootstrapped admin, CHANGE PASSWORD.

Implement breadcrumb navigation

I've been hearing a few comments from users who say they find it rather confusing to track which parts of navigation certain actions fall under. Breadcrumb navigation should be implemented to make this more clear and allow users to easily navigate backwards instead of starting over from one of the actions in the navigation sidebar.

Add user stats module to Dashboard

This module should display total hours scheduled, total hours requested, hours scheduled for each position, and number of times the user has been late.

[PagodaBox] Some queries not returning results.

This bug appears to be only appearing on my PagodaBox test instance. Certain queries are not returning any results.

Examples:
Dashboard doesn't show a schedule, even though one exists in my test instance for that schedule period.

'My Positions' returns zero positions even though the user is scheduled for two.

Backup and reset time clocks each week

Time clocks should be backed up and reset on a new week.

How they should be packed up is a topic under consideration. A new MySQL table for each week is a terrible idea. A new SQLite database for each week is under consideration but caries file permission concerns. Backing up to a JSON files is under consideration, but has a number of issues including file permission concerns. MongoDB is being heavily considered but introduces some concerns about adding another dependency.

Allow start and end hours for schedule views.

Allow admins to define a default start and end hour for schedules and availability schedules.

E.g. Employers who don't schedule before 7am or after 10pm shouldn't have 12am-6am or 10pm-11pm showing up in their schedule views.

User's password is changed to blank on edit, if left empty.

When editing a user, if their password is left blank that becomes their password. Leaving the password field blank should leave their password unchanged. I implemented something I thought would work, but it's not working correctly.

Perhaps their original password (encrypted of course) should be stored in a hidden field that is used to compare the value of the password fields.

Add front-end controls for time resolution

All the backend code has support for configurable time resolution where relevant, but it's currently set to "1 hour" by default. Time resolution controls should be available to the user and passable to parts of the backend that support it.

Implement mailing service

A mailing service should be created which implements Swiftmailer and can be utilized to email users when their account is created, email supervisors when an employee posts their availability, and provide a form for supervisors to email all their employees.

Implement AvailabilitySchedule managment

CRUD for AvailabilitySchedule needs to be remade using a method similar to Employee Scheduler where the user selects availability based on clicked table cells for each preference level. The old table view from Employee Scheduler should be reused as best as possible and should be made to work with the new data structure.

Implement SchedulePeriod Management

The basic CRUD scaffold has been generated. It needs to be fully implemented.

This should include viewing schedule periods as a list with start and end dates listed. Viewing a schedule period should reveal users scheduled/with availabilities for that schedule period. Creating a schedule period should be a simple form with a DateTime selector for start time and end time. Editing should be the same. Deleting should be a simple REST request only to be completed by supervisors.

Supervisors can be their own supervisors

When supervisor or admin is editing their own user profile, they show up in the supervisors list and can thus set themselves as their own supervisor. Doing so does not cause any errors or any other problems, and there is no real reason why someone would set themselves as their own supervisor.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.