Time Card Status TM.TCS.00
SL2018 CU5 Windows 10 client fully patched / updated as of 4/01/2021
SQL 2019 Version 15.0.2080.9 Application Database Compatibility Level SQL Server 2014 (120)
Behavior change from SL 2015 CU2
When selecting the option "Entire Company" the grid is populated with employees that haven't been active in years, some of whom are not even setup in Employee and Resource Maintenance.
Further it appears that the stored procedure PJLABHDR_Spk74 was changed sometime between SL2015 CU2 and SL2018 CU5. To restore the behavior back to SL2015 CU2 I basically changed the WHERE CLAUSE in SL2018 CU5 to match the WHERE CLAUSE in SL2015 CU2.
So My question is why was this change made? Have I created new concerns in SL2018 CU5 by changing this WHERE CLAUSE to match the where clause in SL2015 CU2?
-- SL2018 CU5
create procedure [dbo].[PJLABHDR_Spk74] @parm1 varchar (10), @parm2 varchar (250) , @parm3 smalldatetime , @parm4 smalldatetime , @parm5 varchar(100)
WITH EXECUTE AS '07718158D19D4f5f9D23B55DBF5DF1'
as
select e.manager1, e.manager2, e.gl_subacct, e.emp_name, e.employee, h.period_num,
h.week_num, e.emp_status, e.date_hired, e.date_terminated, h.le_type, h.le_status,
h.docnbr, s.emp_name, m.emp_name, h.pe_date, h.le_id07, e.cpnyID
from pjemploy e
left outer join pjlabhdr h
on e.employee = h.employee
and h.le_status <> 'X'
left outer join pjemploy s
on e.manager1 = s.employee
left outer join pjemploy m
on e.manager2 = m.employee
where e.cpnyid like @parm1 and
e.emp_status <> 'P' and
(e.date_terminated is null or e.date_terminated = ' ' or
e.date_terminated >= @parm3) and
e.date_hired <= @parm4 and
e.cpnyid in (select cpnyid from dbo.UserAccessCpny(@parm5))
order by e.emp_name, e.employee, h.period_num, h.week_num
GO
-- SL2015 CU2
create procedure [dbo].[PJLABHDR_Spk74] @parm1 varchar (10), @parm2 varchar (250) , @parm3 smalldatetime , @parm4 smalldatetime , @parm5 varchar(100)
WITH EXECUTE AS '07718158D19D4f5f9D23B55DBF5DF1'
as
select e.manager1, e.manager2, e.gl_subacct, e.emp_name, e.employee, h.period_num,
h.week_num, e.emp_status, e.date_hired, e.date_terminated, h.le_type, h.le_status,
h.docnbr, s.emp_name, m.emp_name, h.pe_date, h.le_id07, e.cpnyID
from pjemploy e
left outer join pjlabhdr h
on e.employee = h.employee
left outer join pjemploy s
on e.manager1 = s.employee
left outer join pjemploy m
on e.manager2 = m.employee
where e.cpnyid like @parm1 and
e.emp_status <> 'P' and
(e.date_terminated is null or e.date_terminated = ' ' or
e.date_terminated >= @parm3) and
h.le_status <> 'X' and
e.date_hired <= @parm4 and
e.cpnyid in (select cpnyid from dbo.UserAccessCpny(@parm5))
order by e.emp_name, e.employee, h.period_num, h.week_num
GO
Indeed you are absolutely correct. All unwanted resources that were displayed in Time Card Status did not have a termination date. Entering a termination date corrected this issue. This change in behavior from SL2015 CU2 is consistent with the online documentation for the Termination Date field found in Employee and Resource Maintenance which states in part ... Although this field is optional, it affects the list of resources that appears in Timecard Status.
So in fact we were taking advantage of a bug in SL2015 CU2 that no longer exists in SL2018 CU5.
I have entered termination dates and reverted the stored procedure PJLABHDR_Spk74 back to the original that came with SL2018 CU5.
Thank you very much for your prompt feedback regarding this thread.
Dear Eric,
I can't answer why it was changed in CU5, I'm not seeing a specific change or bug documented.
Do the inactive employees have a termination date or hire date? I believe that screen uses the termination date to determine if an employee should not show on that screen.
I tested this by making an employee inactive (they didn't have any recent timecards in the current year anyway), and they still show. Then I put in a termination date of 01/1/2020, and the employee no longer appears.
Best Regards,
Jana MacDonald
Stay up to date on forum activity by subscribing. You can also customize your in-app and email Notification settings across all subscriptions.
André Arnaud de Cal... 291,253 Super User 2024 Season 2
Martin Dráb 230,188 Most Valuable Professional
nmaenpaa 101,156