Files
ViciDialSVN/agc_2-X/trunk/docs/TIMECLOCK_PROCESS.txt
T
mattf 39e8c8a507 added vicidial_timeclock_audit_log for a non-editable log
fixed database inconsistencies in files.

git-svn-id: svn://192.168.202.10@879 3d104415-ff17-0410-8863-d5cf3c621b8a
2008-05-26 04:10:08 +00:00

102 lines
4.3 KiB
Plaintext

Timeclock process flow 2008-05-12
** THIS TIMECLOCK FUNCTIONALITY PROSESS IS PLANNED FOR THE 2.0.5 RELEASE **
This will outline the process I have thought through for adding a timeclock component to the VICIDIAL system. The objective is to add the following features to make VICIDIAL a more well-rounded product:
- Allow vicidial users to clock-in to the system
- Add a SHIFT section to administration
- Allow restrictions of agent-login by shift
- Allow ability to not allow agents to log-in to any VICIDIAL page(admin or agent) without clocking in.
- Have reports showing all timeclock totals for various parameters(user-group/campaign/time-period/in-groups/etc...)
- ability to allow managers to alter timeclock records with audit trail
- reports showing user log activity outside of shift timeframes
Description:
The first new feature to be added to help with the overall adoption of this feature is the ability to have the system optionally generate unique userIDs as users are entered into the system. For this purpose a new auto-generate option has been added to the add-a-new-user and copy-user functions. This auto-generate feature will take the auto_user_add_value field in the system_settings table and check to see if an agent with that ID exists in the system. If they do, then 7 will be added to the number and checked again until a non-used number is found.
To facilitate more workforce management, as is desired with the addition of a timeclock function to VICIDIAL, I have decided to add a SHIFT structure to the system as well. This should allow for scheduling of user_groups of agents and will have the ability to not allow them to login if they try to login outside of their scheduled hours. A shift will have a start time and a length(to make running over midnight easier) as well as a list of the days of the week that the shift applies. Each user-group can have multiple shifts activated for it, for instance you may want a Monday-Friday shift of 9AM-5PM and a Saturday shift of 10AM to 4PM. In this case the user-group would have two shifts selected. Some reports will also be viewable by shift as well.
Newly Created Scripts:
timeclock.php - linked to from vicidial.php/admin.php/welcome.php to give easy access for users to use the timeclock and then go back to what they were doing.
More to come...
The Database Changes:
# add field for auto-increment of users
ALTER TABLE system_settings ADD auto_user_add_value INT(9) UNSIGNED default '101';
UPDATE system_settings SET auto_user_add_value='2110';
# This table contains system shift information
CREATE TABLE vicidial_shifts (
shift_id VARCHAR(20) NOT NULL,
shift_name VARCHAR(50),
shift_start_time VARCHAR(4) default '0900',
shift_length VARCHAR(5) default '16:00',
shift_weekdays VARCHAR(7) default '0123456',
index (shift_id)
);
# add field for allowable shifts for user groups
ALTER TABLE vicidial_user_groups ADD group_shifts TEXT;
# This table contains the log of timeclock activity
CREATE TABLE vicidial_timeclock_log (
timeclock_id INT(9) UNSIGNED AUTO_INCREMENT PRIMARY KEY NOT NULL,
event_epoch INT(10) UNSIGNED NOT NULL,
event_date DATETIME NOT NULL,
login_sec INT(10) UNSIGNED,
event VARCHAR(50) NOT NULL,
user VARCHAR(20) NOT NULL,
user_group VARCHAR(20) NOT NULL,
ip_address VARCHAR(15),
shift_id VARCHAR(20),
notes VARCHAR(255),
manager_user VARCHAR(20),
manager_ip VARCHAR(15),
event_datestamp TIMESTAMP NOT NULL,
tcid_link INT(9) UNSIGNED,
index (user)
);
# This table contains the current timeclock status of a user
CREATE TABLE vicidial_timeclock_status (
user VARCHAR(20) UNIQUE NOT NULL,
user_group VARCHAR(20) NOT NULL,
event_epoch INT(10) UNSIGNED,
event_date TIMESTAMP,
status VARCHAR(50),
ip_address VARCHAR(15),
shift_id VARCHAR(20),
index (user)
);
# This table contains the audit log of timeclock activity(non-editable)
CREATE TABLE vicidial_timeclock_audit_log (
timeclock_id INT(9) UNSIGNED NOT NULL,
event_epoch INT(10) UNSIGNED NOT NULL,
event_date DATETIME NOT NULL,
login_sec INT(10) UNSIGNED,
event VARCHAR(50) NOT NULL,
user VARCHAR(20) NOT NULL,
user_group VARCHAR(20) NOT NULL,
ip_address VARCHAR(15),
shift_id VARCHAR(20),
event_datestamp TIMESTAMP NOT NULL,
tcid_link INT(9) UNSIGNED,
index (timeclock_id),
index (user)
);