Reg : Exception Policy

General support regarding TimeTrex, such as
configuring policies/taxes or processing payroll.
Locked
rajeshv
Posts: 25
Joined: Wed Apr 25, 2007 5:41 am

Reg : Exception Policy

Post by rajeshv »

Case 1 :

I have created the Excption policy and applied the policy to

some employees. I didnt get any exception report for that employees.

My crontab is working properly

Time Trex Version : 1.6.2
Platform : Linux

Is any way to upload my database for your reference

Debug Information:

mysqlt): select session_id,user_id,ip_address,created_date,updated_date from authentication WHERE session_id = 'c56ba4e9aa979d4b1b4f21fb748dbd70' AND ip_address = '10.100.8.39' AND updated_date >= 1179200907
--------------------------------------------------------------------------------

--------------------------------------------------------------------------------
(mysqlt): update authentication set updated_date = 1179215307 where session_id = 'c56ba4e9aa979d4b1b4f21fb748dbd70'
--------------------------------------------------------------------------------

--------------------------------------------------------------------------------
(mysqlt): SET SESSION time_zone='Asia/Calcutta'
--------------------------------------------------------------------------------

--------------------------------------------------------------------------------
(mysqlt): select * from station where company_id = '1' AND station_id = 'eb0679e08c0c0cb2fe906fcaebc3bd06' AND deleted = 0
--------------------------------------------------------------------------------

--------------------------------------------------------------------------------
(mysqlt): select * from cron WHERE deleted = 0 ORDER BY last_run_date DESC LIMIT 1
--------------------------------------------------------------------------------

--------------------------------------------------------------------------------
(mysqlt): select d.severity_id as severity_id, count(*) as count from exception as a LEFT JOIN user_date as b ON a.user_date_id = b.id LEFT JOIN users as c ON b.user_id = c.id LEFT JOIN exception_policy as d ON a.exception_policy_id = d.id LEFT JOIN pay_period as e ON b.pay_period_id = e.id where b.user_id = '1' AND b.date_stamp < '2007-05-15 00:00:00' AND e.status_id = 10 AND NOT EXISTS ( select z.id from request as z where z.user_date_id = a.user_date_id AND z.status_id = 30 ) AND ( a.deleted = 0 AND b.deleted = 0 AND e.deleted=0) GROUP BY d.severity_id ORDER BY d.severity_id desc
--------------------------------------------------------------------------------

--------------------------------------------------------------------------------
(mysqlt): select name FROM bread_crumb WHERE user_id = '1' AND name = 'Exception List' LIMIT 1
--------------------------------------------------------------------------------

--------------------------------------------------------------------------------
(mysqlt): UPDATE bread_crumb SET url = '/timetrex/interface/punch/UserExceptionList.php', created_date = 1179215308 WHERE user_id = '1' AND name = 'Exception List'
--------------------------------------------------------------------------------
/tmp/timetrex//e3/adodb_e38c9af121c22eb019824552e73b32d2.cache reloaded, ttl=80448 [ select * from exception where id = -1 ]

--------------------------------------------------------------------------------
(mysqlt): SELECT COUNT(*) FROM exception as a LEFT JOIN user_date as b ON a.user_date_id = b.id LEFT JOIN users as c ON b.user_id = c.id LEFT JOIN branch as d ON c.default_branch_id = d.id LEFT JOIN department as e ON c.default_department_id = e.id LEFT JOIN user_group as f ON c.group_id = f.id LEFT JOIN user_title as g ON c.title_id = g.id LEFT JOIN pay_period as h ON b.pay_period_id = h.id LEFT JOIN exception_policy as i ON a.exception_policy_id = i.id where c.company_id = '1' AND h.status_id in (10) AND ( a.deleted = 0 AND c.deleted = 0 AND h.deleted = 0 ) LIMIT 1
--------------------------------------------------------------------------------

--------------------------------------------------------------------------------
(mysqlt): select a.*, b.date_stamp as user_date_stamp, i.severity_id as severity_id, i.type_id as exception_policy_type_id, b.user_id as user_id from exception as a LEFT JOIN user_date as b ON a.user_date_id = b.id LEFT JOIN users as c ON b.user_id = c.id LEFT JOIN branch as d ON c.default_branch_id = d.id LEFT JOIN department as e ON c.default_department_id = e.id LEFT JOIN user_group as f ON c.group_id = f.id LEFT JOIN user_title as g ON c.title_id = g.id LEFT JOIN pay_period as h ON b.pay_period_id = h.id LEFT JOIN exception_policy as i ON a.exception_policy_id = i.id where c.company_id = '1' AND h.status_id in (10) AND ( a.deleted = 0 AND c.deleted = 0 AND h.deleted = 0 ) order by i.severity_id desc,c.last_name asc,b.date_stamp asc,i.type_id asc LIMIT 0,25
--------------------------------------------------------------------------------
/tmp/timetrex//c9/adodb_c9a309e7eb2ff082b3c57b3bb34c16fa.cache reloaded, ttl=80425 [ select * from users where id = -1 ]

--------------------------------------------------------------------------------
(mysqlt): select * from users where company_id = '1' AND deleted = 0 order by status_id asc,last_name asc


Case 2 :

I have added more than 300 employees in Recurring Schedule using defined template but I can see only 15 employees and I have added more than 2 categories(shift type) in Recurring Schedule but I can see only
1 categories.

Please help me to rectify this
shaunw
Posts: 7839
Joined: Tue Sep 19, 2006 2:22 pm

Post by shaunw »

First, I recommend you upgrade to the latest version of TimeTrex.

I will deal with Case 1 for now. How did you apply the exception policy? Did you recalculate employees timesheet after you setup the exception policy? TimeTrex does not retroactively apply policies, so you need to recalculate employees timesheet to do so.

If the exception policy is setup and recalculated, are you sure there are any real exceptions? Can you provide screenshots of your exception policy, policy group, and the timesheet of an employee who you think should have exceptions?
rajeshv
Posts: 25
Joined: Wed Apr 25, 2007 5:41 am

Re : Exception Policy

Post by rajeshv »

Thanks Shaun Now I am getting exceptional report.

Whether I do the recalculate employees time sheet at the end of day or can I automate this ?

I have updated the latest Time Trex version 1.6.4 in my systems .

In Time Trex 1.6.2 version

I have seen three options buttons(>>,<<, ....) while moving data from unselected to selected data

say In Time Sheet Summary report ---> Pay Period

Unselected Pay Period to Selected Pay Period

In Time Trex 1.6.4 version I can see only two buttons(<<, >>). Whether its default
options or upgrade problem

Can You give the solution for the Case 2(Submitted in Previous Post)
shaunw
Posts: 7839
Joined: Tue Sep 19, 2006 2:22 pm

Post by shaunw »

You only need to re-calculate employees when you change policies and want to apply them retroactively, or in a few rare other cases.

TimeTrex automatically applies the policies going forward, so you don't need to recalculate under normal circumstances, and definitely not each day.

The "..." icon not appearing anymore in certain places is actually a bug fix. It should still appear in places like Schedule -> MySchedule.

As for Case #2, I'm not sure I understand what the issue is. You added 300 employees to a recurring schedule template, but only 15 of them are showing up? If you click on the "Next >" or "End >" buttons at the top or bottom of the list table, is there more then one page worth of schedules?
rajeshv
Posts: 25
Joined: Wed Apr 25, 2007 5:41 am

Reg : Recurring Schedule

Post by rajeshv »

In Recurring Schedule List I have added more than one schedule list
but it shows only one schedule List

How Can I send or upload my database script for your reference

For Your reference

mysqlt): select session_id,user_id,ip_address,created_date,updated_date from authentication WHERE session_id = 'a72f2bc3c3f7a075c00f00faa25d8ffa' AND ip_address = '10.100.8.39' AND updated_date >= 1179451449
--------------------------------------------------------------------------------

--------------------------------------------------------------------------------
(mysqlt): update authentication set updated_date = 1179465849 where session_id = 'a72f2bc3c3f7a075c00f00faa25d8ffa'
--------------------------------------------------------------------------------

--------------------------------------------------------------------------------
(mysqlt): SET SESSION time_zone='Asia/Calcutta'
--------------------------------------------------------------------------------

--------------------------------------------------------------------------------
(mysqlt): select * from station where company_id = '1' AND station_id = '61e2d7563c26c2b07ea6235686bb552d' AND deleted = 0
--------------------------------------------------------------------------------

--------------------------------------------------------------------------------
(mysqlt): select * from cron WHERE deleted = 0 ORDER BY last_run_date DESC LIMIT 1
--------------------------------------------------------------------------------

--------------------------------------------------------------------------------
(mysqlt): select d.severity_id as severity_id, count(*) as count from exception as a LEFT JOIN user_date as b ON a.user_date_id = b.id LEFT JOIN users as c ON b.user_id = c.id LEFT JOIN exception_policy as d ON a.exception_policy_id = d.id LEFT JOIN pay_period as e ON b.pay_period_id = e.id where b.user_id = '1' AND b.date_stamp < '2007-05-18 00:00:00' AND e.status_id = 10 AND NOT EXISTS ( select z.id from request as z where z.user_date_id = a.user_date_id AND z.status_id = 30 ) AND ( a.deleted = 0 AND b.deleted = 0 AND e.deleted=0) GROUP BY d.severity_id ORDER BY d.severity_id desc
--------------------------------------------------------------------------------

--------------------------------------------------------------------------------
(mysqlt): select name FROM bread_crumb WHERE user_id = '1' AND name = 'Recurring Schedule List' LIMIT 1
--------------------------------------------------------------------------------

--------------------------------------------------------------------------------
(mysqlt): UPDATE bread_crumb SET url = '/timetrex/interface/schedule/RecurringScheduleControlList.php', created_date = 1179465849 WHERE user_id = '1' AND name = 'Recurring Schedule List'
--------------------------------------------------------------------------------
/tmp/timetrex//d2/adodb_d247e89874d3951c177127366889fc53.cache reloaded, ttl=34342 [ select * from recurring_schedule_control where id = -1 ]

--------------------------------------------------------------------------------
(mysqlt): SELECT COUNT(*) FROM recurring_schedule_control as a LEFT JOIN recurring_schedule_template_control as b ON a.recurring_schedule_template_control_id = b.id LEFT JOIN recurring_schedule_user as c ON a.id = c.recurring_schedule_control_id LEFT JOIN users as d ON c.user_id = d.id where a.company_id = '1' AND d.id in (150) AND (a.deleted = 0 AND b.deleted = 0 AND d.deleted=0) LIMIT 1
--------------------------------------------------------------------------------

--------------------------------------------------------------------------------
(mysqlt): select a.*, b.name as name, b.description as description, c.user_id as user_id, d.last_name as last_name from recurring_schedule_control as a LEFT JOIN recurring_schedule_template_control as b ON a.recurring_schedule_template_control_id = b.id LEFT JOIN recurring_schedule_user as c ON a.id = c.recurring_schedule_control_id LEFT JOIN users as d ON c.user_id = d.id where a.company_id = '1' AND d.id in (150) AND (a.deleted = 0 AND b.deleted = 0 AND d.deleted=0) order by last_name asc LIMIT 0,25
--------------------------------------------------------------------------------

--------------------------------------------------------------------------------
(mysqlt): SELECT name,url FROM bread_crumb WHERE user_id = '1' ORDER BY created_date DESC LIMIT 5
--------------------------------------------------------------------------------



Server response time: 1.229 seconds.
Copyright © 2007 TimeTrex. All Rights Reserved.



Debug Buffer
============================================================================
Memory Usage: 7188908
----------------------------------------------------------------------------
DEBUG [167]: [Function](): URI: /timetrex/interface/schedule/RecurringScheduleControlList.php
DEBUG [169]: [Function](): Production: 1
DEBUG [491]: Authentication::Check(): Session Name: SessionID
DEBUG [497]: Authentication::Check(): Session ID: a72f2bc3c3f7a075c00f00faa25d8ffa
DEBUG [302]: Validator::stripNonAlphaNumeric(): Alpha Numeric String:a72f2bc3c3f7a075c00f00faa25d8ffa
DEBUG [78]: Authentication::getIdle(): Idle Seconds Allowed: 14400
DEBUG [302]: Validator::stripNonAlphaNumeric(): Alpha Numeric String:a72f2bc3c3f7a075c00f00faa25d8ffa
DEBUG [64]: [Function](): User Authenticated: rajesh11688 Created Date: 1179463112
DEBUG [1853]: UserFactory::isInformationComplete(): User Information is Complete:
DEBUG [100]: TTDate::setTimeZone(): Setting TimeZone: Asia/Calcutta
DEBUG [129]: TTDate::setDateFormat(): Setting Default Date Format: d/m/Y
DEBUG [143]: TTDate::setTimeFormat(): Setting Default Time Format: g:i A
DEBUG [157]: TTDate::setTimeUnitFormat(): Setting Default Time Unit Format: 10
DEBUG [95]: [Function](): Locale Cookie: en_US
DEBUG [156]: TTi18n::getLanguageFromLocale(): Locale: en_US
DEBUG [103]: [Function](): User Preference Language matches cookie!
DEBUG [191]: TTi18n::setLocale(): Attempting to set Locale to: en_IN Category: 6
DEBUG [194]: TTi18n::setLocale(): bAttempting to set Locale to: en_IN
DEBUG [220]: TTi18n::setLocale(): Setting Locale To: en_IN
DEBUG [1853]: UserFactory::isInformationComplete(): User Information is Complete:
DEBUG [1048]: UserPreferenceFactory::isPreferencesComplete(): User Preferences IS Complete:
DEBUG [131]: [Function](): Station ID Cookie found! 61e2d7563c26c2b07ea6235686bb552d
DEBUG [231]: [Function](): UnRead Messages: 0
DEBUG [48]: BreadCrumb::setCrumb(): Dropping Bread Crumb: Recurring Schedule List URL: /timetrex/interface/schedule/RecurringScheduleControlList.php
DEBUG [429]: HierarchyListFactory::getHierarchyChildrenByCompanyIdAndUserIdAndObjectTypeID(): Hierarchy Control ID: 1
DEBUG [69] Array: [Function](): Permission Children Ids:
array(1) {
[0]=>
int(150)
}


DEBUG [78] Array: [Function](): Selected Objects
NULL


DEBUG [295] Array: RecurringScheduleControlListFactory::getSearchByCompanyIdAndArrayCriteria(): aOrder Data:
NULL


DEBUG [327] Array: RecurringScheduleControlListFactory::getSearchByCompanyIdAndArrayCriteria(): bOrder Data:
array(1) {
["last_name"]=>
string(3) "asc"
}


DEBUG [328] Array: RecurringScheduleControlListFactory::getSearchByCompanyIdAndArrayCriteria(): Filter Data:
array(1) {
["permission_children_ids"]=>
array(1) {
[0]=>
int(150)
}
}


DEBUG [399]: RecurringScheduleControlListFactory::getSearchByCompanyIdAndArrayCriteria(): Query: select a.*, b.name as name, b.description as description, c.user_id as user_id, d.last_name as last_name from recurring_schedule_control as a LEFT JOIN recurring_schedule_template_control as b ON a.recurring_schedule_template_control_id = b.id LEFT JOIN recurring_schedule_user as c ON a.id = c.recurring_schedule_control_id LEFT JOIN users as d ON c.user_id = d.id where a.company_id = ? AND d.id in (?) AND (a.deleted = 0 AND b.deleted = 0 AND d.deleted=0) order by last_name asc
============================================================================

============================================================================
PROFILER OUTPUT
============================================================================
Calls Time Routine
-----------------------------------------------------------------------------
1 174.0670 ms (14.38 %) Authentication::Check()
1 67.8000 ms (5.60 %) Interface.inc - Check for Exceptions
1 36.4251 ms (3.01 %) Interface.inc - Check for UNREAD messages...
1 11.0719 ms (0.91 %) getEmptyRecordSet()
1 22.0490 ms (1.82 %) getPermissionHierarchyChildrenByCompanyIdAndUserId
1 552.5599 ms (45.65 %) unprofiled

346.5350 ms (28.63 %) Missed
============================================================================
1210.5079 ms (100.00 %) OVERALL TIME
============================================================================
[/b]
shaunw
Posts: 7839
Joined: Tue Sep 19, 2006 2:22 pm

Post by shaunw »

Please email your TimeTrex URL, login and password to support@timetrex.com so we can login and take a look around.
rajeshv
Posts: 25
Joined: Wed Apr 25, 2007 5:41 am

Reg : Exception Policy

Post by rajeshv »

I have sent databse dump to the support@timetrex.com .

PHP v 5.2.1
Mysql v 5.0.37
TT 1.6.6

I unable to get In Late, Out Early and Under Scheduled exception report .

Please let me know the other issues also if you found on database


thanks
Rajesh
shaunw
Posts: 7839
Joined: Tue Sep 19, 2006 2:22 pm

Post by shaunw »

Please email your TimeTrex URL, login and password to support@timetrex.com so we can login and take a look around.
rajeshv
Posts: 25
Joined: Wed Apr 25, 2007 5:41 am

Reg : Exception Policy

Post by rajeshv »

I had Installed lampp and timetrex on local machine only .


Thanks
Rajesh
rajeshv
Posts: 25
Joined: Wed Apr 25, 2007 5:41 am

Reg : Exception Policy

Post by rajeshv »

I have applied 6 Exception policy but I can get only 2 Exception reports

while Debugging

DEBUG [730]: Factory::CommitTransaction(): CommitTransaction(): Transaction Count: 1 Trans Off: 5
DEBUG [284]: ExceptionPolicyFactory::calcExceptions(): User Date ID: 3
DEBUG [314]: ExceptionPolicyFactory::calcExceptions(): Found Punches: 2
DEBUG [327]: ExceptionPolicyFactory::calcExceptions(): Found Active Exceptions: 6
DEBUG [330]: ExceptionPolicyFactory::calcExceptions(): Found Exception Type: A
DEBUG [330]: ExceptionPolicyFactory::calcExceptions(): Found Exception Type: D
DEBUG [647]: PunchFactory::setScheduleID(): aFinding SchedulePolicyID for this Punch:
DEBUG [655]: PunchFactory::setScheduleID(): bFinding SchedulePolicyID for this Punch: 1179285300
DEBUG [676]: PunchFactory::setScheduleID(): Did not find Schedule...
DEBUG [408]: ExceptionPolicyFactory::calcExceptions(): NO Schedule Found
DEBUG [330]: ExceptionPolicyFactory::calcExceptions(): Found Exception Type: E
DEBUG [647]: PunchFactory::setScheduleID(): aFinding SchedulePolicyID for this Punch:
DEBUG [655]: PunchFactory::setScheduleID(): bFinding SchedulePolicyID for this Punch: 1179318300
DEBUG [676]: PunchFactory::setScheduleID(): Did not find Schedule...
DEBUG [438]: ExceptionPolicyFactory::calcExceptions(): NO Schedule Found
DEBUG [330]: ExceptionPolicyFactory::calcExceptions(): Found Exception Type: H
DEBUG [685]: ExceptionPolicyFactory::calcExceptions(): Not Scheduled
DEBUG [330]: ExceptionPolicyFactory::calcExceptions(): Found Exception Type: K
DEBUG [503]: ExceptionPolicyFactory::calcExceptions(): Punch: Status: 10 Punch Control ID: 3 TimeStamp: 1179285300
DEBUG [503]: ExceptionPolicyFactory::calcExceptions(): Punch: Status: 20 Punch Control ID: 3 TimeStamp: 1179318300
DEBUG [509] Array: ExceptionPolicyFactory::calcExceptions(): Punch Pair for Control ID:3


For Exception A,D,E and H

I got the following error
Not Scheduled

what kind of Error it is


Thanks
Rajesh
shaunw
Posts: 7839
Joined: Tue Sep 19, 2006 2:22 pm

Post by shaunw »

I got the following error
Not Scheduled

what kind of Error it is
Where does it say this is an error?

"Not Scheduled" is an exception, but not an error. It simply means the employee is not scheduled on the day that the exception occurs.

If you don't plan on using schedules, or you don't want to see this exception, simply disable it in your exception policy.
rajeshv
Posts: 25
Joined: Wed Apr 25, 2007 5:41 am

Reg : Exception

Post by rajeshv »

Its not an error. I can get Missed in and Out Punch exception.

I cant get In Late,Out Early and under scheduled hours exceptions for

the above .



Thanks
Rajesh
shaunw
Posts: 7839
Joined: Tue Sep 19, 2006 2:22 pm

Post by shaunw »

Those exceptions are all based on the employees schedule. So the employee must be scheduled, and the watch windows must be setup correctly before those exceptions will work.

Can you send us a screenshot of your TimeSheet, Schedule and Exception policy for a specific employee on a specific day so we can confirm everything is setup correctly?
rajeshv
Posts: 25
Joined: Wed Apr 25, 2007 5:41 am

Reg : Exception Policy

Post by rajeshv »

I have sent to you the Screen shot of TimeSheet, Schedule and Exception policy for a specific employee for your reference

Thanks
Rajesh
shaunw
Posts: 7839
Joined: Tue Sep 19, 2006 2:22 pm

Post by shaunw »

You're screenshots look fine, however you never included a screenshot of the employee's actual schedule (Schedule -> MySchedule). Since recurring schedules are just "suggestions" if you will for actual schedules, you need to look in Schedule -> MySchedule to see what the employees actual schedule is, to determine if the In Late/Out Early exceptions are working properly or not. The key thing to look for is a schedule with the times in blue text, NOT black text. Black text just means that what WOULD be scheduled based on the employees recurring schedule, blue text means thats what IS scheduled.

I looked at your database dump and noticed that the employee you showed in your screenshot did not have a proper blue text schedule, therefore the exceptions that require a schedule could not be triggered.

I also noticed that your database tables are not using InnoDB, this is extremely bad and it is quite likely to cause
data corruption if you don't convert your tables immediately.

See this forum topic for instructions on how to do that:

http://forums.timetrex.com/viewtopic.php?t=229
rajeshv
Posts: 25
Joined: Wed Apr 25, 2007 5:41 am

Reg : Exception Policy

Post by rajeshv »

Thanks Shaun. Now I am getting In Late and Out Early exception reports.

So we have to enter the schedule time (Schedule -> MySchedule) for every day for

each employee. Is any other way to automate it ? Once we updated in Recurring

Schedule why can't I get Blue text in Schedule -> MySchedule .

I had seen new feature in Time Trex 2.0 Mass Scheduling. It's very useful for bulk schedules

for bulk employees.

Once again I thanks for your immediate response.
shaunw
Posts: 7839
Joined: Tue Sep 19, 2006 2:22 pm

Post by shaunw »

Recurring schedules will automatically schedule employees, but the way it works is TimeTrex runs a maintenance job twice an hour checking for recurring schedules with shifts starting in the next 4 hours. If it finds one, then TimeTrex will automatically change a "black" schedule to a "blue" schedule at that time.

So this only happens going forward in time. If you create a recurring schedule and tell it to start 6 weeks before the day you create it, any schedule shifts before that day will stay black, any AFTER that day will change to blue 4 hours before the shift starts.

So you only need to manually add schedules in the past if you want to get the In Late/Out Early exceptions.
Locked